From: Benjamin Peterson Date: Fri, 17 May 2013 16:33:26 +0000 (-0500) Subject: reset __class__, so multiple runs don't fail (closes #17999) X-Git-Tag: v3.4.0a1~703 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a29ac45200ba89c474b7b5c7f2973b4d38116fe7;p=thirdparty%2FPython%2Fcpython.git reset __class__, so multiple runs don't fail (closes #17999) --- diff --git a/Lib/test/test_super.py b/Lib/test/test_super.py index d0ce40a7ed79..37fc2d913417 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')