Skip to content

Commit 708fc82

Browse files
committed
update tests to properly clean the temp folder
1 parent 775032a commit 708fc82

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/test_utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
fftsanitise,
1313
cleanup
1414
)
15+
from flucoma import fluid
1516

1617
def test_fftsanitise():
1718
bad_fft = [512.0, 128.0, 512.0]
@@ -64,6 +65,9 @@ def test_make_temp():
6465
assert another_file != temp_file
6566

6667
def test_cleanup():
68+
tempfiles = Path.home() / ".python-flucoma"
69+
test_file = Path("test") / "test_file.wav"
70+
fluid.hpss(test_file)
6771
cleanup()
68-
temp_path = Path(".flucoma")
69-
assert not temp_path.exists()
72+
leftovers = [x for x in tempfiles.iterdir() if x != ".DS_Store"]
73+
assert len(leftovers) == 0

0 commit comments

Comments
 (0)