Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_ffmpeg_binaries_download(paths):
_windows = True if os.name == 'nt' else False
file_path = ''
try:
file_path = download_ffmpeg_binaries(path = paths, os_windows = _windows)
if file_path:
assert os.path.isfile(file_path), "FFmpeg download failed!"
if paths != tempfile.gettempdir():
shutil.rmtree(os.path.abspath(os.path.join(file_path ,"../..")))
except Exception as e:
if paths == 'wrong_test_path' and "Permission Denied:" in str(e):
pass
else:
pytest.fail(str(e))