[Python-3000-checkins] r59246 - python/branches/py3k/Lib/test/regrtest.py

christian.heimes python-3000-checkins at python.org
Fri Nov 30 23:09:59 CET 2007


Author: christian.heimes
Date: Fri Nov 30 23:09:59 2007
New Revision: 59246

Modified:
   python/branches/py3k/Lib/test/regrtest.py
Log:
abc's are subclasses of _Abstract, not instances.

Modified: python/branches/py3k/Lib/test/regrtest.py
==============================================================================
--- python/branches/py3k/Lib/test/regrtest.py	(original)
+++ python/branches/py3k/Lib/test/regrtest.py	Fri Nov 30 23:09:59 2007
@@ -701,7 +701,7 @@
     pic = sys.path_importer_cache.copy()
     abcs = {obj: obj._abc_registry.copy()
             for abc in [getattr(_abcoll, a) for a in _abcoll.__all__
-                        if isinstance(getattr(_abcoll, a), _Abstract)]
+                        if issubclass(getattr(_abcoll, a), _Abstract)]
             for obj in abc.__subclasses__() + [abc]}
 
     if indirect_test:
@@ -751,7 +751,7 @@
 
     # Clear ABC registries, restoring previously saved ABC registries.
     for abc in [getattr(_abcoll, a) for a in _abcoll.__all__]:
-        if not isinstance(abc, _Abstract):
+        if not issubclass(abc, _Abstract):
             continue
         for obj in abc.__subclasses__() + [abc]:
             obj._abc_registry = abcs.get(obj, {}).copy()


More information about the Python-3000-checkins mailing list