Skip to content

Commit a61eebd

Browse files
author
Dennis Kennetz
committed
properly joining file and dirpath to remove
1 parent 4243d8e commit a61eebd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_singularity.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
@needs_singularity
1818
def test_singularity_pullfolder(tmp_path):
1919
for directory, subdir, files in os.walk(os.getcwd()):
20-
if 'debian.img' in files:
21-
os.remove(os.path.join(directory, files))
22-
print("removed image hiding away deep within!")
20+
for image in files:
21+
if image.startswith("debian"):
22+
os.remove(os.path.join(directory, image))
23+
print("removed image hiding away deep within!")
2324

2425
if "SINGULARITY_PULLFOLDER" in os.environ:
2526
del os.environ["SINGULARITY_PULLFOLDER"]

0 commit comments

Comments
 (0)