summaryrefslogtreecommitdiff
path: root/functional_tests/test_multiprocessing
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2013-03-17 05:06:04 -0400
committerJohn Szakmeister <john@szakmeister.net>2013-03-17 05:06:04 -0400
commit657e4a9174ccaacd42d07648eba81f32a77e94b3 (patch)
tree60e3370da70c25a5f475b455d515da043eed237b /functional_tests/test_multiprocessing
parent045fbc0fbe3297acf98e0b6eb7194a072399829c (diff)
downloadnose-657e4a9174ccaacd42d07648eba81f32a77e94b3.tar.gz
Fix #627: require at least 2 cpus for TestConcurrentShared
Anything less, and the tests will run serially and fail the test.
Diffstat (limited to 'functional_tests/test_multiprocessing')
-rw-r--r--functional_tests/test_multiprocessing/test_concurrent_shared.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/functional_tests/test_multiprocessing/test_concurrent_shared.py b/functional_tests/test_multiprocessing/test_concurrent_shared.py
index 517da99..d0318ff 100644
--- a/functional_tests/test_multiprocessing/test_concurrent_shared.py
+++ b/functional_tests/test_multiprocessing/test_concurrent_shared.py
@@ -2,6 +2,7 @@ import os
import sys
import unittest
+import multiprocessing
from test_multiprocessing import MPTestBase
@@ -21,6 +22,10 @@ class TestConcurrentShared(MPTestBase):
# capturing.
MPTestBase.setUp(self)
+ if multiprocessing.cpu_count() < 2:
+ raise unittest.SkipTest(
+ "At least 2 cpus required for this test; skipping")
+
def runTest(self):
assert 'Ran 2 tests in 1.' in self.output, "make sure two tests use 1.x seconds (no more than 2 seconds)"
assert str(self.output).strip().endswith('OK')