r47066 - tell us all of them
hawkowl-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org Thu, 24 Mar 2016 08:25:32 -0600 (MDT)
| Newsgroups | gmane.comp.python.twisted.commits |
|---|---|
| Message-ID | <[email protected]> |
Author: hawkowl
Date: Thu Mar 24 08:25:28 2016
New Revision: 47066
Modified:
branches/oldstyle-decorator-8244/twisted/test/test_nooldstyle.py
Log:
tell us all of them
Modified: branches/oldstyle-decorator-8244/twisted/test/test_nooldstyle.py
==============================================================================
--- branches/oldstyle-decorator-8244/twisted/test/test_nooldstyle.py (original)
+++ branches/oldstyle-decorator-8244/twisted/test/test_nooldstyle.py Thu Mar 24 08:25:28 2016
@@ -133,13 +133,20 @@
except ImportError:
raise unittest.SkipTest("Not importable.")
+ oldStyleClasses = []
+
for name, val in inspect.getmembers(module):
if hasattr(val, "__module__") \
and val.__module__ == self.module:
if isinstance(val, types.ClassType):
- raise unittest.FailTest(
- "{val} is an old-style class".format(
- val=fullyQualifiedName(val)))
+ oldStyleClasses.append(fullyQualifiedName(val))
+
+
+ if oldStyleClasses:
+ raise unittest.FailTest(
+ "Old-style classes in {module}: {val}".format(
+ module=self.module,
+ val=", ".join(oldStyleClasses)))
for x in getModule("twisted").walkModules():