Skip to content

Commit 626d397

Browse files
authored
bpo-44808: Fix test_inspect in refleak mode (GH-27544)
1 parent 414dcb1 commit 626d397

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_inspect.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,11 +587,12 @@ def test_getsource_on_code_object(self):
587587

588588
class TestGetsourceInteractive(unittest.TestCase):
589589
def tearDown(self):
590-
mod.ParrotDroppings.__module__ = mod
590+
mod.ParrotDroppings.__module__ = self.mod
591591
sys.modules['__main__'] = self.main
592592

593593
def test_getclasses_interactive(self):
594594
self.main = sys.modules['__main__']
595+
self.mod = mod.ParrotDroppings.__module__
595596
class MockModule:
596597
__file__ = None
597598
sys.modules['__main__'] = MockModule

0 commit comments

Comments
 (0)