diff options
Diffstat (limited to 'tests/coveragetest.py')
-rw-r--r-- | tests/coveragetest.py | 8 |
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('\\', '/') |