File: test_process_timeout.py

package info (click to toggle)
nose 1.3.7-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 2,668 kB
  • sloc: python: 15,697; makefile: 119; xml: 42; sh: 15
file content (23 lines) | stat: -rw-r--r-- 743 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import nose

from test_multiprocessing import MPTestBase

class TestMPTimeout(MPTestBase):
    args = ['--process-timeout=1']
    suitepath = os.path.join(os.path.dirname(__file__), 'support', 'timeout.py')

    def runTest(self):
        raise nose.SkipTest('Disabled in Debian')
        assert "TimedOutException: 'timeout.test_timeout'" in self.output
        assert "Ran 2 tests in" in self.output
        assert "FAILED (errors=1)" in self.output

class TestMPTimeoutPass(TestMPTimeout):
    args = ['--process-timeout=3']

    def runTest(self):
        assert "TimedOutException: 'timeout.test_timeout'" not in self.output
        assert "Ran 2 tests in" in self.output
        assert str(self.output).strip().endswith('OK')