We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54de547 commit fccf67aCopy full SHA for fccf67a
1 file changed
Lib/test/test_import/__init__.py
@@ -367,11 +367,11 @@ def test_import_raises_ModuleNotFoundError(self):
367
def test_import_null_byte_in_name_raises_ModuleNotFoundError(self):
368
# gh-150633: module names containing null bytes should not
369
# lead to duplicates in sys.modules
370
- before = set(sys.modules.keys())
+ before = set(sys.modules)
371
with self.assertRaises(ModuleNotFoundError):
372
__import__('zipimport\x00junk')
373
374
- self.assertEqual(set(sys.modules.keys()), before)
+ self.assertEqual(set(sys.modules), before)
375
376
def test_from_import_missing_module_raises_ModuleNotFoundError(self):
377
0 commit comments