mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
reset __class__, so multiple runs don't fail (closes #17999)
This commit is contained in:
parent
2f6fe51860
commit
a29ac45200
1 changed files with 5 additions and 0 deletions
|
@ -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')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue