Skip to content

Commit

Permalink
Add consider_namespace_packages=False
Browse files Browse the repository at this point in the history
  • Loading branch information
tonynajjar committed Mar 12, 2024
1 parent d9ffd80 commit 5037c9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions launch_testing/launch_testing/pytest/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def collect(self):
if _pytest_version_ge(7):
# self.path exists since 7
from _pytest.pathlib import import_path
module = import_path(self.path, root=None)
module = import_path(self.path, root=None, consider_namespace_packages=False)
else:
module = self.fspath.pyimport()
yield self.makeitem(
Expand All @@ -175,7 +175,7 @@ def find_launch_test_entrypoint(path):
try:
if _pytest_version_ge(7):
from _pytest.pathlib import import_path
module = import_path(path, root=None)
module = import_path(path, root=None, consider_namespace_packages=False)
else:
# Assume we got legacy path in earlier versions of pytest
module = path.pyimport()
Expand Down

0 comments on commit 5037c9b

Please sign in to comment.