mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-30 17:52:26 +01:00
Merge pull request #6974 from odysseus-dev/test/import-stub-guard-snapshot-performance
test: avoid tuple-list allocation in the import-stub guard
This commit is contained in:
@@ -189,7 +189,7 @@ def bare_module_stubs():
|
|||||||
test modules install them on purpose.
|
test modules install them on purpose.
|
||||||
"""
|
"""
|
||||||
found = set()
|
found = set()
|
||||||
for name, mod in list(sys.modules.items()):
|
for name, mod in sys.modules.copy().items():
|
||||||
if not name.startswith(_GUARDED_PREFIXES):
|
if not name.startswith(_GUARDED_PREFIXES):
|
||||||
continue
|
continue
|
||||||
if type(mod) is not types.ModuleType:
|
if type(mod) is not types.ModuleType:
|
||||||
|
|||||||
Reference in New Issue
Block a user