diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-12-24 15:21:25 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-12-24 15:21:25 -0500 |
commit | fd9b1e460826789468e4a8b0986aad074615587b (patch) | |
tree | 457f94a92e093c6c6d1f37f5fc5c371c109a1d81 /tests/coveragetest.py | |
parent | 5d4f399607fd711a1fb11d7c011f4466c6f50603 (diff) | |
download | python-coveragepy-git-fd9b1e460826789468e4a8b0986aad074615587b.tar.gz |
Move the test program into the test
Diffstat (limited to 'tests/coveragetest.py')
-rw-r--r-- | tests/coveragetest.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/coveragetest.py b/tests/coveragetest.py index 4a917192..707652fb 100644 --- a/tests/coveragetest.py +++ b/tests/coveragetest.py @@ -397,8 +397,8 @@ class CoverageTest( # Add our test modules directory to PYTHONPATH. I'm sure there's too # much path munging here, but... - testmods = self.nice_file(self.here(), 'tests/modules') - zipfile = self.nice_file(self.here(), 'tests/zipmods.zip') + testmods = self.nice_file(self.working_root(), 'tests/modules') + zipfile = self.nice_file(self.working_root(), 'tests/zipmods.zip') pypath = os.getenv('PYTHONPATH', '') if pypath: pypath += os.pathsep @@ -409,9 +409,10 @@ class CoverageTest( print(self.last_command_output) return self.last_command_status, self.last_command_output - def here(self): + def working_root(self): + """Where is the root of the coverage.py working tree?""" 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('\\', '/') |