summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/modules/usepkgs.py2
-rw-r--r--tests/test_api.py7
-rw-r--r--tests/test_process.py9
3 files changed, 4 insertions, 14 deletions
diff --git a/tests/modules/usepkgs.py b/tests/modules/usepkgs.py
index 4e94acaa..222e68ce 100644
--- a/tests/modules/usepkgs.py
+++ b/tests/modules/usepkgs.py
@@ -1,7 +1,7 @@
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
-import pkg1.p1a, pkg1.p1b
+import pkg1.p1a, pkg1.p1b, pkg1.sub
import pkg2.p2a, pkg2.p2b
import othermods.othera, othermods.otherb
import othermods.sub.osa, othermods.sub.osb
diff --git a/tests/test_api.py b/tests/test_api.py
index 6f142100..35ac6440 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -461,12 +461,11 @@ class SourceOmitIncludeTest(OmitIncludeTestsMixin, CoverageTest):
summary[k[:-3]] = v
return summary
- def test_source_package(self):
- lines = self.coverage_usepkgs(source=["pkg1"])
- self.filenames_in(lines, "p1a p1b")
+ def test_source_package_unexecuted(self):
+ lines = self.coverage_usepkgs(source=["pkg1.sub"])
self.filenames_not_in(lines, "p2a p2b othera otherb osa osb")
# Because source= was specified, we do search for unexecuted files.
- self.assertEqual(lines['p1c'], 0)
+ self.assertEqual(lines['runmod3'], 0)
def test_source_package_dotted(self):
lines = self.coverage_usepkgs(source=["pkg1.p1b"])
diff --git a/tests/test_process.py b/tests/test_process.py
index a9e8d4c6..be9bdb76 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -505,15 +505,6 @@ class ProcessTest(CoverageTest):
self.assertEqual(st, 0)
self.assertEqual(self.line_count(out), 6, out)
- def test_coverage_doubledashsource_module(self):
- """ pkg1.sub is not a directory, verify the files it contains
- and that were not run show in the report """
- out = self.run_command("coverage run --source pkg1.sub -m pkg1.sub arg")
- self.assertIn('pkg1.sub.__main__: passed', out)
- st, out = self.run_command_status("coverage report")
- self.assertEqual(st, 0)
- self.assertIn('runmod3.py', out)
-
def test_coverage_run_script_imports_doubledashsource(self):
# This file imports try_execfile, which compiles it to .pyc, so the
# first run will have __file__ == "try_execfile.py" and the second will