From: Richard Oudkerk Date: Fri, 15 Jun 2012 20:53:34 +0000 (+0100) Subject: Fix _TestListener.ALLOWED_TYPES and add sanity check X-Git-Tag: v3.3.0b1~237^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9125775aa6f98541c5357e0153bd5fd067353469;p=python Fix _TestListener.ALLOWED_TYPES and add sanity check --- diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index d79110abba..2704827f49 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):