summaryrefslogtreecommitdiff
path: root/tests/coveragetest.py
diff options
context:
space:
mode:
authorNed Batchelder <nedbat@gmail.com>2016-12-24 15:04:22 -0500
committerNed Batchelder <nedbat@gmail.com>2016-12-24 15:04:22 -0500
commit5d4f399607fd711a1fb11d7c011f4466c6f50603 (patch)
treea02534e2f0b9269dea5aca1d8bde889ab859189e /tests/coveragetest.py
parent88207df5fa00861bf42f0993b23ce541817b72dd (diff)
parent5c131498d140e172c5471929be4f30c65a200547 (diff)
downloadpython-coveragepy-git-5d4f399607fd711a1fb11d7c011f4466c6f50603.tar.gz
Merged in dachary/coverage.py/issue-502-7 (pull request #117)
also use AST for while constants in python-2.7 #502
Diffstat (limited to 'tests/coveragetest.py')
-rw-r--r--tests/coveragetest.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/coveragetest.py b/tests/coveragetest.py
index dacb9b63..4a917192 100644
--- a/tests/coveragetest.py
+++ b/tests/coveragetest.py
@@ -397,9 +397,8 @@ class CoverageTest(
# Add our test modules directory to PYTHONPATH. I'm sure there's too
# much path munging here, but...
- here = os.path.dirname(self.nice_file(coverage.__file__, ".."))
- testmods = self.nice_file(here, 'tests/modules')
- zipfile = self.nice_file(here, 'tests/zipmods.zip')
+ testmods = self.nice_file(self.here(), 'tests/modules')
+ zipfile = self.nice_file(self.here(), 'tests/zipmods.zip')
pypath = os.getenv('PYTHONPATH', '')
if pypath:
pypath += os.pathsep
@@ -410,6 +409,9 @@ class CoverageTest(
print(self.last_command_output)
return self.last_command_status, self.last_command_output
+ def here(self):
+ return os.path.dirname(self.nice_file(coverage.__file__, ".."))
+
def report_from_command(self, cmd):
"""Return the report from the `cmd`, with some convenience added."""
report = self.run_command(cmd).replace('\\', '/')