File: test_concurrent_shared.py

package info (click to toggle)
nose 1.3.7-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,900 kB
  • sloc: python: 15,733; makefile: 99; xml: 42; sh: 2
file content (42 lines) | stat: -rw-r--r-- 1,350 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# This test has been disabled because it's simply too unreliable.  There are way
# too many issues with Travis and other build farms.

# import os
# import sys
# import unittest
#
# import multiprocessing
# from test_multiprocessing import MPTestBase
#
#
# is_pypy = '__pypy__' in sys.builtin_module_names
#
#
# class TestConcurrentShared(MPTestBase):
#     processes = 2
#     suitepath = os.path.join(os.path.dirname(__file__), 'support',
#                              'concurrent_shared')
#
#     def setUp(self):
#         if is_pypy:
#             raise unittest.SkipTest('pypy warm-up is too slow; skipping')
#
#         # Need to call the base's setUp() routine to get the necessary output
#         # capturing.
#         MPTestBase.setUp(self)
#
#     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')
#
#
# class TestConcurrentSharedWithAutomaticProcessesCount(TestConcurrentShared):
#     """Make sure negative numbers are handled gracefully."""
#     processes = -1
#
#     def setUp(self):
#         if multiprocessing.cpu_count() < 2:
#             raise unittest.SkipTest(
#                     "At least 2 cpus required for this test; skipping")
#
#         TestConcurrentShared.setUp(self)