summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_multiprocessing.py
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2012-06-15 20:53:34 (GMT)
committerRichard Oudkerk <shibturn@gmail.com>2012-06-15 20:53:34 (GMT)
commit9125775aa6f98541c5357e0153bd5fd067353469 (patch)
tree44c67695898c367eaf8c558784a3bb42a37c5a33 /Lib/test/test_multiprocessing.py
parentc90929624b53561a37c730a7801bd14b1d2873ca (diff)
downloadcpython-9125775aa6f98541c5357e0153bd5fd067353469.zip
cpython-9125775aa6f98541c5357e0153bd5fd067353469.tar.gz
cpython-9125775aa6f98541c5357e0153bd5fd067353469.tar.bz2
Fix _TestListener.ALLOWED_TYPES and add sanity check
Diffstat (limited to 'Lib/test/test_multiprocessing.py')
-rw-r--r--Lib/test/test_multiprocessing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index d79110a..2704827 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -2268,7 +2268,7 @@ class _TestConnection(BaseTestCase):
class _TestListener(BaseTestCase):
- ALLOWED_TYPES = ('processes')
+ ALLOWED_TYPES = ('processes',)
def test_multiple_bind(self):
for family in self.connection.families:
@@ -2850,10 +2850,12 @@ def create_test_cases(Mixin, type):
result = {}
glob = globals()
Type = type.capitalize()
+ ALL_TYPES = {'processes', 'threads', 'manager'}
for name in list(glob.keys()):
if name.startswith('_Test'):
base = glob[name]
+ assert set(base.ALLOWED_TYPES) <= ALL_TYPES, set(base.ALLOWED_TYPES)
if type in base.ALLOWED_TYPES:
newname = 'With' + Type + name[1:]
class Temp(base, unittest.TestCase, Mixin):