Пример #1
0
def test_ffmpeg_binaries_download(paths):
	"""
	Testing Static FFmpeg auto-download on Windows OS
	"""
	_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 != return_static_ffmpeg():
				shutil.rmtree(os.path.abspath(os.path.join(file_path ,"../..")))
	except Exception as e:
		if paths == 'wrong_test_path':
			pass
		else:
			pytest.fail(str(e))
Пример #2
0
def test_ffmpeg_binaries_download(paths, os_bit):
    """
    Testing Static FFmpeg auto-download on Windows OS
    """
    file_path = ""
    try:
        file_path = download_ffmpeg_binaries(path=paths,
                                             os_windows=_windows,
                                             os_bit=os_bit)
        if file_path:
            logger.debug("FFmpeg Binary path: {}".format(file_path))
            assert os.path.isfile(file_path), "FFmpeg download failed!"
            shutil.rmtree(os.path.abspath(os.path.join(file_path, "../..")))
    except Exception as e:
        if paths == "wrong_test_path" or os_bit == "wrong_bit":
            pass
        else:
            pytest.fail(str(e))
Пример #3
0
def test_ffmpeg_binaries_download(paths, os_bit):
    """
    Testing Static FFmpeg auto-download on Windows OS
    """
    file_path = ""
    try:
        file_path = download_ffmpeg_binaries(path=paths,
                                             os_windows=_windows,
                                             os_bit=os_bit)
        if file_path:
            assert os.path.isfile(file_path), "FFmpeg download failed!"
            shutil.rmtree(os.path.abspath(os.path.join(file_path, "../..")))
    except Exception as e:
        if paths == "wrong_test_path" or os_bit == "wrong_bit":
            pass
        elif isinstance(e, requests.exceptions.Timeout):
            logger.exceptions(str(e))
        else:
            pytest.fail(str(e))