Skip to content

Commit 4c23e21

Browse files
committed
test: remove file-removal that isn't needed anymore
1 parent 78c0915 commit 4c23e21

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

tests/helpers.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,6 @@ def re_line(pat, text):
170170
return lines[0]
171171

172172

173-
def remove_files(*patterns):
174-
"""Remove all files that match any of the patterns."""
175-
for pattern in patterns:
176-
for fname in glob.glob(pattern):
177-
os.remove(fname)
178-
179173
def remove_tree(dirname):
180174
"""Remove a directory tree.
181175

tests/mixins.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import pytest
1616

1717
from coverage.misc import SysModuleSaver
18-
from tests.helpers import change_dir, make_file, remove_files, remove_tree
18+
from tests.helpers import change_dir, make_file, remove_tree
1919

2020

2121
class PytestBase:
@@ -99,10 +99,9 @@ def clean_local_file_imports(self):
9999
# So that we can re-import files, clean them out first.
100100
self._sys_module_saver.restore()
101101

102-
# Also have to clean out the .pyc file, since the timestamp
102+
# Also have to clean out the .pyc files, since the timestamp
103103
# resolution is only one second, a changed file might not be
104104
# picked up.
105-
remove_files("*.pyc", "*$py.class")
106105
remove_tree("__pycache__")
107106
importlib.invalidate_caches()
108107

0 commit comments

Comments
 (0)