summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/inorout.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/coverage/inorout.py b/coverage/inorout.py
index d5e8b226..17e11b64 100644
--- a/coverage/inorout.py
+++ b/coverage/inorout.py
@@ -359,6 +359,10 @@ class InOrOut(object):
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.trace:
msg = "Already imported a file that will be measured: {}".format(filename)