gh-103247: clear the module cache in a test in test_importlib/extensions/test_loader.py (GH-104226)

This commit is contained in:
sunmy2019 2023-05-10 08:59:04 +08:00 committed by GitHub
parent 29f348e232
commit 22f3425c3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -262,6 +262,7 @@ class MultiPhaseExtensionModuleTests(abc.LoaderTests):
def test_try_registration(self):
# Assert that the PyState_{Find,Add,Remove}Module C API doesn't work.
with util.uncache(self.name):
module = self.load_module()
with self.subTest('PyState_FindModule'):
self.assertEqual(module.call_state_registration_func(0), None)