MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / test_cli_save_edl

Function test_cli_save_edl

tests/test_cli.py:916–943  ·  view source on GitHub ↗

Test `save-edl` command.

(tmp_path: Path)

Source from the content-addressed store, hash-verified

914
915
916def test_cli_save_edl(tmp_path: Path):
917 """Test `save-edl` command."""
918 exit_code, _ = invoke_cli(
919 [
920 "-i",
921 DEFAULT_VIDEO_PATH,
922 "-o",
923 str(tmp_path),
924 "time",
925 "-s",
926 "2s",
927 "-d",
928 "4s",
929 "detect-content",
930 "save-edl",
931 ]
932 )
933 assert exit_code == 0
934 output_path = tmp_path.joinpath(f"{DEFAULT_VIDEO_NAME}.edl")
935 assert os.path.exists(output_path)
936 EXPECTED_EDL_OUTPUT = f"""* CREATED WITH PYSCENEDETECT {scenedetect.__version__}
937TITLE: {DEFAULT_VIDEO_NAME}
938FCM: NON-DROP FRAME
939
940001 AX V C 00:00:02:00 00:00:03:18 00:00:02:00 00:00:03:18
941002 AX V C 00:00:03:18 00:00:06:00 00:00:03:18 00:00:06:00
942"""
943 assert output_path.read_text() == EXPECTED_EDL_OUTPUT
944
945
946def test_cli_save_edl_with_params(tmp_path: Path):

Callers

nothing calls this directly

Calls 1

invoke_cliFunction · 0.90

Tested by

no test coverage detected