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 5a1459e commit e68637dCopy full SHA for e68637d
tests/test_shadowed_module.py
@@ -99,7 +99,11 @@ def test_shadowed_modules_when_importing_integrations(
99
source = pathlib.Path(spec.origin).read_text(encoding="utf-8")
100
tree = ast.parse(source, filename=spec.origin)
101
integration_dependencies = find_unrecognized_dependencies(tree)
102
+
103
for dependency in integration_dependencies:
104
sys.modules[dependency] = types.ModuleType(dependency)
105
with pytest.raises(integrations.DidNotEnable):
106
importlib.import_module(module_path)
107
108
+ for dependency in integration_dependencies:
109
+ del sys.modules[dependency]
0 commit comments