[Python-checkins] cpython: Fix _TestListener.ALLOWED_TYPES and add sanity check
richard.oudkerk
python-checkins at python.org
Fri Jun 15 23:00:21 CEST 2012
http://hg.python.org/cpython/rev/4c704dc97496
changeset: 77450:4c704dc97496
user: Richard Oudkerk <shibturn at gmail.com>
date: Fri Jun 15 21:53:34 2012 +0100
summary:
Fix _TestListener.ALLOWED_TYPES and add sanity check
files:
Lib/test/test_multiprocessing.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -2268,7 +2268,7 @@
class _TestListener(BaseTestCase):
- ALLOWED_TYPES = ('processes')
+ ALLOWED_TYPES = ('processes',)
def test_multiple_bind(self):
for family in self.connection.families:
@@ -2850,10 +2850,12 @@
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):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list