summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/test_helpers.py9
-rw-r--r--tests/coveragetest.py5
2 files changed, 8 insertions, 6 deletions
diff --git a/coverage/test_helpers.py b/coverage/test_helpers.py
index efe68dcd..082fc15e 100644
--- a/coverage/test_helpers.py
+++ b/coverage/test_helpers.py
@@ -132,8 +132,13 @@ class StdStreamCapturingMixin(TestCase):
return self.captured_stderr.getvalue()
-class TempDirMixin(TestCase):
- """A test case mixin that creates a temp directory and files in it."""
+class TempDirMixin(SysPathAwareMixin, ModuleAwareMixin, TestCase):
+ """A test case mixin that creates a temp directory and files in it.
+
+ Includes SysPathAwareMixin and ModuleAwareMixin, because making and using
+ temp dirs like this will also need that kind of isolation.
+
+ """
# Our own setting: most of these tests run in their own temp directory.
run_in_temp_dir = True
diff --git a/tests/coveragetest.py b/tests/coveragetest.py
index 19fc0612..a680ed46 100644
--- a/tests/coveragetest.py
+++ b/tests/coveragetest.py
@@ -8,8 +8,7 @@ from coverage.backward import StringIO, import_local_file
from coverage.backward import importlib # pylint: disable=unused-import
from coverage.control import _TEST_NAME_FILE
from coverage.test_helpers import (
- ModuleAwareMixin, SysPathAwareMixin, EnvironmentAwareMixin,
- StdStreamCapturingMixin, TempDirMixin,
+ EnvironmentAwareMixin, StdStreamCapturingMixin, TempDirMixin,
)
from tests.backtest import run_command
@@ -19,8 +18,6 @@ from tests.backtest import run_command
OK, ERR = 0, 1
class CoverageTest(
- ModuleAwareMixin,
- SysPathAwareMixin,
EnvironmentAwareMixin,
StdStreamCapturingMixin,
TempDirMixin,