Skip to content

Commit

Permalink
bpo-44808: Fix test_inspect in refleak mode (GH-27544)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal committed Aug 2, 2021
1 parent 414dcb1 commit 626d397
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/test/test_inspect.py
Expand Up @@ -587,11 +587,12 @@ def test_getsource_on_code_object(self):

class TestGetsourceInteractive(unittest.TestCase):
def tearDown(self):
mod.ParrotDroppings.__module__ = mod
mod.ParrotDroppings.__module__ = self.mod
sys.modules['__main__'] = self.main

def test_getclasses_interactive(self):
self.main = sys.modules['__main__']
self.mod = mod.ParrotDroppings.__module__
class MockModule:
__file__ = None
sys.modules['__main__'] = MockModule
Expand Down

0 comments on commit 626d397

Please sign in to comment.