summaryrefslogtreecommitdiff
path: root/functional_tests/test_multiprocessing
diff options
context:
space:
mode:
authormyint <myint@macbookpro.local>2012-05-13 08:26:57 -0700
committermyint <myint@macbookpro.local>2012-05-13 08:26:57 -0700
commit2af3963f958f385fbb68a13962d86f6a4d1735f4 (patch)
tree8365c0b9c0f2dc50b52c2c075d4ecfeacbde47ee /functional_tests/test_multiprocessing
parent278ed8947d45d477237311b8973c5da74720564c (diff)
downloadnose-2af3963f958f385fbb68a13962d86f6a4d1735f4.tar.gz
Add test case with negative "--processes" value
This should result in automatic selection of processes based on CPU count rather than hanging.
Diffstat (limited to 'functional_tests/test_multiprocessing')
-rw-r--r--functional_tests/test_multiprocessing/test_concurrent_shared.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/functional_tests/test_multiprocessing/test_concurrent_shared.py b/functional_tests/test_multiprocessing/test_concurrent_shared.py
index 2552c2b..cce3a50 100644
--- a/functional_tests/test_multiprocessing/test_concurrent_shared.py
+++ b/functional_tests/test_multiprocessing/test_concurrent_shared.py
@@ -11,3 +11,13 @@ class TestConcurrentShared(MPTestBase):
assert 'Ran 2 tests in 1.' in self.output, "make sure two tests use 1.x seconds (no more than 2 seconsd)"
assert str(self.output).strip().endswith('OK')
+
+class TestConcurrentSharedWithAutomaticProcessesCount(MPTestBase):
+ """Make sure negative numbers are handled gracefully."""
+ processes = -1
+ suitepath = os.path.join(os.path.dirname(__file__), 'support',
+ 'concurrent_shared')
+
+ def runTest(self):
+ assert 'Ran 2 tests in 1.' in self.output, "make sure two tests use 1.x seconds (no more than 2 seconsd)"
+ assert str(self.output).strip().endswith('OK')