summaryrefslogtreecommitdiff
path: root/tests/test_process.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2018-10-14 17:59:40 -0400
committerNed Batchelder <ned@nedbatchelder.com>2018-10-14 17:59:40 -0400
commit4a404ce724280bf9c5f4bcf1e6a5ba76d7499d89 (patch)
tree9dd07ab826b6effea3c696adf75e51c207abcd1d /tests/test_process.py
parent83ccf7ad923f75c736c42bf9117a57a156042c4a (diff)
downloadpython-coveragepy-git-4a404ce724280bf9c5f4bcf1e6a5ba76d7499d89.tar.gz
Use --source to ensure tests are showing what we want.
Travis started having these extra files in coverage reports from our tests: site-packages/pkg_resources/_vendor/six.py site-packages/pkg_resources/extern/__init__.py I don't know why they are being pulled in, but the tests aren't interested in them, and it is throwing off the results.
Diffstat (limited to 'tests/test_process.py')
-rw-r--r--tests/test_process.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_process.py b/tests/test_process.py
index 626c8094..fe817c5d 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -312,6 +312,7 @@ class ProcessTest(CoverageTest):
self.make_file(".coveragerc", """\
[run]
+ source = .
parallel = true
""")
@@ -366,6 +367,7 @@ class ProcessTest(CoverageTest):
self.make_file(".coveragerc", """\
[run]
+ source = .
parallel = True
[paths]
@@ -1056,7 +1058,7 @@ class FailUnderTest(CoverageTest):
d = 6
e = 7
""")
- st, _ = self.run_command_status("coverage run forty_two_plus.py")
+ st, _ = self.run_command_status("coverage run --source=. forty_two_plus.py")
self.assertEqual(st, 0)
def test_report_43_is_ok(self):
@@ -1107,7 +1109,7 @@ class UnicodeFilePathsTest(CoverageTest):
def test_accented_dot_py(self):
# Make a file with a non-ascii character in the filename.
self.make_file(u"h\xe2t.py", "print('accented')")
- out = self.run_command(u"coverage run h\xe2t.py")
+ out = self.run_command(u"coverage run --source=. h\xe2t.py")
self.assertEqual(out, "accented\n")
# The HTML report uses ascii-encoded HTML entities.
@@ -1141,7 +1143,7 @@ class UnicodeFilePathsTest(CoverageTest):
def test_accented_directory(self):
# Make a file with a non-ascii character in the directory name.
self.make_file(u"\xe2/accented.py", "print('accented')")
- out = self.run_command(u"coverage run \xe2/accented.py")
+ out = self.run_command(u"coverage run --source=. \xe2/accented.py")
self.assertEqual(out, "accented\n")
# The HTML report uses ascii-encoded HTML entities.