Skip to content

Commit

Permalink
Ignore namespace packages in the already-imported check. #888
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Oct 31, 2021
1 parent 56713f2 commit b63ef8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions coverage/inorout.py
Expand Up @@ -479,6 +479,10 @@ def warn_already_imported_files(self):
if filename in warned:
continue

if len(getattr(mod, "__path__", ())) > 1:
# A namespace package, which confuses this code, so ignore it.
continue

disp = self.should_trace(filename)
if disp.has_dynamic_filename:
# A plugin with dynamic filenames: the Python file
Expand Down

0 comments on commit b63ef8b

Please sign in to comment.