summaryrefslogtreecommitdiff
path: root/test-excluded
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2013-09-27 18:35:15 +0100
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2013-09-27 18:35:15 +0100
commit0a3b1a065257109295f9322f5a7e199d157acfe6 (patch)
tree8f7a25d69fe3728d23bfe7b5bbaef0957bbf3184 /test-excluded
parentd7b5706244fca58d8a2564ba6394cb460d2ca2c6 (diff)
downloadcoverage-test-runner-0a3b1a065257109295f9322f5a7e199d157acfe6.tar.gz
Fix importing submodules with the same basenames
This patch fixes a bug in CoverageTestRunner.py, where submodules with the same basenames were not loaded into separate module objects. Because the module names passed to imp.load_module() were the same, previously loaded modules would be reloaded in place, causing different problems: 1. Imports of the affected modules in the test and tested code would sometimes import a different module and cause AttributeError exceptions when expected symbols were not present in the imported module. 2. Sometimes, all but one of the imported modules would incorrectly be considered to have zero test coverage.
Diffstat (limited to 'test-excluded')
-rw-r--r--test-excluded5
1 files changed, 4 insertions, 1 deletions
diff --git a/test-excluded b/test-excluded
index 2835413..6314bf9 100644
--- a/test-excluded
+++ b/test-excluded
@@ -1,2 +1,5 @@
+subdir/__init__.py
subdir/bar.py
-
+subdir/modules_with_same_names_but_different_symbols/module1/__init__.py
+subdir/modules_with_same_names_but_different_symbols/module2/__init__.py
+subdir/modules_with_same_names_but_different_symbols/__init__.py