diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-05-17 16:33:26 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-05-17 16:33:26 (GMT) |
commit | a29ac45200ba89c474b7b5c7f2973b4d38116fe7 (patch) | |
tree | b093bcafa20f49e4ff5ef57b014c14f5e7462e4c | |
parent | 2f6fe518601eb23880d8f925cd1dcd33e83f7310 (diff) | |
download | cpython-a29ac45200ba89c474b7b5c7f2973b4d38116fe7.zip cpython-a29ac45200ba89c474b7b5c7f2973b4d38116fe7.tar.gz cpython-a29ac45200ba89c474b7b5c7f2973b4d38116fe7.tar.bz2 |
reset __class__, so multiple runs don't fail (closes #17999)
-rw-r--r-- | Lib/test/test_super.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_super.py b/Lib/test/test_super.py index d0ce40a..37fc2d9 100644 --- a/Lib/test/test_super.py +++ b/Lib/test/test_super.py @@ -44,6 +44,11 @@ class G(A): class TestSuper(unittest.TestCase): + def tearDown(self): + # This fixes the damage that test_various___class___pathologies does. + nonlocal __class__ + __class__ = TestSuper + def test_basics_working(self): self.assertEqual(D().f(), 'ABCD') |