diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-05-01 17:53:27 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-05-01 17:53:27 -0400 |
commit | bfd2b7585e64f4766e4eec315f94d187e2d4f976 (patch) | |
tree | 67e94be7cad9f3a147d96f2e8066ed6864135f32 /tests/mixins.py | |
parent | 3d43c74cd2dd8c66c29572bc04a4b0de3e206364 (diff) | |
download | python-coveragepy-git-bfd2b7585e64f4766e4eec315f94d187e2d4f976.tar.gz |
refactor: move the remaining backward.py code, no more backward.py
Diffstat (limited to 'tests/mixins.py')
-rw-r--r-- | tests/mixins.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/mixins.py b/tests/mixins.py index ff47a4da..44b16f6c 100644 --- a/tests/mixins.py +++ b/tests/mixins.py @@ -7,6 +7,7 @@ Test class mixins Some of these are transitional while working toward pure-pytest style. """ +import importlib import os import os.path import shutil @@ -14,8 +15,6 @@ import sys import pytest -from coverage.backward import importlib - from tests.helpers import change_dir, make_file, remove_files @@ -130,8 +129,7 @@ class SysPathModulesMixin: if os.path.exists("__pycache__"): shutil.rmtree("__pycache__") - if importlib and hasattr(importlib, "invalidate_caches"): - importlib.invalidate_caches() + importlib.invalidate_caches() class StdStreamCapturingMixin: |