diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-30 22:09:59 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-30 22:09:59 (GMT) |
commit | 04a4eb3405eab76285a7693add2c4f00128fdf74 (patch) | |
tree | 73eee24871f5bbf62d422008729b14c82e80b4f1 /Lib | |
parent | 941973a32808226cfe3b7f8c0dca704e76435c3d (diff) | |
download | cpython-04a4eb3405eab76285a7693add2c4f00128fdf74.zip cpython-04a4eb3405eab76285a7693add2c4f00128fdf74.tar.gz cpython-04a4eb3405eab76285a7693add2c4f00128fdf74.tar.bz2 |
abc's are subclasses of _Abstract, not instances.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/test/regrtest.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 55817ff..0202207 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -701,7 +701,7 @@ def dash_R(the_module, test, indirect_test, huntrleaks): 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 @@ def dash_R_cleanup(fs, ps, pic, abcs): # 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() |