diff options
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r-- | Lib/test/test_inspect.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py index 3752810..4b78708 100644 --- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -213,9 +213,9 @@ class TestRetrievingSourceCode(GetSourceBase): self.assertEqual(inspect.getfile(mod.StupidGit), mod.__file__) def test_getmodule_recursion(self): - from new import module + from types import ModuleType name = '__inspect_dummy' - m = sys.modules[name] = module(name) + m = sys.modules[name] = ModuleType(name) m.__file__ = "<string>" # hopefully not a real filename... m.__loader__ = "dummy" # pretend the filename is understood by a loader exec("def x(): pass", m.__dict__) |