mirror of
https://github.com/python/cpython.git
synced 2026-08-09 18:50:37 -04:00
reset __class__, so multiple runs don't fail (closes #17999)
This commit is contained in:
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user