diff options
-rw-r--r-- | tests/helpers.py | 6 | ||||
-rw-r--r-- | tests/mixins.py | 5 |
2 files changed, 2 insertions, 9 deletions
diff --git a/tests/helpers.py b/tests/helpers.py index 3d177824..4ed9a2c9 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -170,12 +170,6 @@ def re_line(pat, text): return lines[0] -def remove_files(*patterns): - """Remove all files that match any of the patterns.""" - for pattern in patterns: - for fname in glob.glob(pattern): - os.remove(fname) - def remove_tree(dirname): """Remove a directory tree. diff --git a/tests/mixins.py b/tests/mixins.py index 25663c6e..3d623fb3 100644 --- a/tests/mixins.py +++ b/tests/mixins.py @@ -15,7 +15,7 @@ import sys import pytest from coverage.misc import SysModuleSaver -from tests.helpers import change_dir, make_file, remove_files, remove_tree +from tests.helpers import change_dir, make_file, remove_tree class PytestBase: @@ -99,10 +99,9 @@ class RestoreModulesMixin: # So that we can re-import files, clean them out first. self._sys_module_saver.restore() - # Also have to clean out the .pyc file, since the timestamp + # Also have to clean out the .pyc files, since the timestamp # resolution is only one second, a changed file might not be # picked up. - remove_files("*.pyc", "*$py.class") remove_tree("__pycache__") importlib.invalidate_caches() |