Skip to content

Commit bd4c4ea

Browse files
.
1 parent de31a87 commit bd4c4ea

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/test_shadowed_module.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,9 @@ def test_shadowed_modules_when_importing_integrations(
7979
An integration is determined to be for a third-party module if it cannot
8080
be imported in the environment in which the tests run.
8181
"""
82-
module_path = (
83-
pathlib.Path("sentry_sdk") / "integrations" / integration_submodule_name
84-
)
85-
import_path = ".".join(module_path.with_suffix("").parts)
82+
parts = integration_submodule_name.split(".")
83+
module_path = pathlib.Path("sentry_sdk") / "integrations" / pathlib.Path(*parts)
84+
import_path = ".".join(("sentry_sdk", "integrations", *parts))
8685

8786
integration_dependencies = set()
8887
for py_file in pathlib.Path(module_path).rglob("*.py"):

0 commit comments

Comments
 (0)