Skip to content

Commit

Permalink
Fix test error in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed May 25, 2021
1 parent 181f20e commit 498efa6
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tests/test_ffmpeg_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ def test_ffmpeg_extract_subclip():
assert 0.18 <= clip.duration <= 0.22 # not accurate

if os.path.isdir(extract_subclip_tempdir):
shutil.rmtree(extract_subclip_tempdir)
try:
shutil.rmtree(extract_subclip_tempdir)
except PermissionError:
pass


def test_ffmpeg_resize():
Expand All @@ -63,7 +66,10 @@ def test_ffmpeg_resize():
assert clip.size[1] == expected_size[1]

if os.path.isfile(outputfile):
os.remove(outputfile)
try:
os.remove(outputfile)
except PermissionError:
pass


def test_ffmpeg_stabilize_video():
Expand Down Expand Up @@ -103,7 +109,10 @@ def test_ffmpeg_stabilize_video():
)

if os.path.isdir(stabilize_video_tempdir):
shutil.rmtree(stabilize_video_tempdir)
try:
shutil.rmtree(stabilize_video_tempdir)
except PermissionError:
pass


if __name__ == "__main__":
Expand Down

0 comments on commit 498efa6

Please sign in to comment.