Skip to content

Commit 9dc41a7

Browse files
committed
Remove outdated comment
Seems we need to insert missing modules when the modules are not part of a package or namespace package.
1 parent 3c6caf6 commit 9dc41a7

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/_pytest/pathlib.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -620,10 +620,6 @@ def _import_module_using_spec(
620620
:param insert_modules:
621621
If True, will call insert_missing_modules to create empty intermediate modules
622622
for made-up module names (when importing test files not reachable from sys.path).
623-
Note: we can probably drop insert_missing_modules altogether: instead of
624-
generating module names such as "src.tests.test_foo", which require intermediate
625-
empty modules, we might just as well generate unique module names like
626-
"src_tests_test_foo".
627623
"""
628624
# Checking with sys.meta_path first in case one of its hooks can import this module,
629625
# such as our own assertion-rewrite hook.

0 commit comments

Comments
 (0)