summaryrefslogtreecommitdiff
path: root/tests/coveragetest.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-03-11 20:52:27 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-03-11 20:52:27 -0500
commitcdafcb0913ac238300521463436f03571ad9ae9e (patch)
treeb85192e002f9eb7f0b1ada9df1808b7b26f48d1d /tests/coveragetest.py
parent1d83d59ffacd0736411e492786f83953d247819f (diff)
downloadpython-coveragepy-git-cdafcb0913ac238300521463436f03571ad9ae9e.tar.gz
refactor: pull module cleaning into here
We don't need unittest_mixins' module cleaner anymore.
Diffstat (limited to 'tests/coveragetest.py')
-rw-r--r--tests/coveragetest.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/coveragetest.py b/tests/coveragetest.py
index f08de798..65678d52 100644
--- a/tests/coveragetest.py
+++ b/tests/coveragetest.py
@@ -22,8 +22,8 @@ from coverage.backward import StringIO, import_local_file, string_class, shlex_q
from coverage.cmdline import CoverageScript
from tests.helpers import arcs_to_arcz_repr, arcz_to_arcs, assert_count_equal
-from tests.helpers import run_command, SuperModuleCleaner
-from tests.mixins import StdStreamCapturingMixin, TempDirMixin, PytestBase
+from tests.helpers import run_command
+from tests.mixins import PytestBase, StdStreamCapturingMixin, SysPathModulesMixin, TempDirMixin
# Status returns for the command line.
@@ -35,6 +35,7 @@ TESTS_DIR = os.path.dirname(__file__)
class CoverageTest(
StdStreamCapturingMixin,
+ SysPathModulesMixin,
TempDirMixin,
PytestBase,
):
@@ -61,22 +62,11 @@ class CoverageTest(
def setup_test(self):
super(CoverageTest, self).setup_test()
- self.module_cleaner = SuperModuleCleaner()
-
# Attributes for getting info about what happened.
self.last_command_status = None
self.last_command_output = None
self.last_module_name = None
- def clean_local_file_imports(self):
- """Clean up the results of calls to `import_local_file`.
-
- Use this if you need to `import_local_file` the same file twice in
- one test.
-
- """
- self.module_cleaner.clean_local_file_imports()
-
def start_import_stop(self, cov, modname, modfile=None):
"""Start coverage, import a file, then stop coverage.