diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index 7e9208578be07b..7e8db687939028 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -2327,8 +2327,6 @@ def test_variants(self): self.assertIs(basic.look_up_self(), basic_lookedup) self.assertEqual(basic.initialized_count(), expected_init_count) - loaded.module._clear_module_state() - def test_basic_reloaded(self): # m_copy is copied into the existing module object. # Global state is not changed. @@ -2417,11 +2415,6 @@ def test_with_reinit_reloaded(self): self.assertIs(reloaded.snapshot.cached, reloaded.module) - if hasattr(loaded.module, '_clear_module_state'): - loaded.module._clear_module_state() - if hasattr(reloaded.module, '_clear_module_state'): - reloaded.module._clear_module_state() - # Currently, for every single-phrase init module loaded # in multiple interpreters, those interpreters share a # PyModuleDef for that object, which can be a problem.