Skip to content

Video editing with Python

Move directory of test to temporal location and close clips (#1407)

Álvaro Mondéjar9647679fa811
diff --git a/tests/test_VideoClip.py b/tests/test_VideoClip.py
index 655a7ec6..aa2ac745 100644
--- a/tests/test_VideoClip.py
+++ b/tests/test_VideoClip.py
@@ -62,13 +62,14 @@ def test_write_frame_errors_with_redirected_logs():
def test_write_videofiles_with_temp_audiofile_path():
clip = VideoFileClip("media/big_buck_bunny_432_433.webm").subclip(0.2, 0.5)
location = os.path.join(TMP_DIR, "temp_audiofile_path.webm")
- temp_location = "temp_audiofile"
+ temp_location = os.path.join(TMP_DIR, "temp_audiofile")
if not os.path.exists(temp_location):
os.mkdir(temp_location)
clip.write_videofile(location, temp_audiofile_path=temp_location, remove_temp=False)
assert os.path.isfile(location)
contents_of_temp_dir = os.listdir(temp_location)
assert any(file.startswith("temp_audiofile_path") for file in contents_of_temp_dir)
+ close_all_clips(locals())
def test_save_frame():