]> granicus.if.org Git - python/commitdiff
reset __class__, so multiple runs don't fail (closes #17999)
authorBenjamin Peterson <benjamin@python.org>
Fri, 17 May 2013 16:33:26 +0000 (11:33 -0500)
committerBenjamin Peterson <benjamin@python.org>
Fri, 17 May 2013 16:33:26 +0000 (11:33 -0500)
Lib/test/test_super.py

index d0ce40a7ed794ec3f14e4c9d1df79570a551970e..37fc2d913417c454d011a8459b32b791f7cf3cd4 100644 (file)
@@ -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')