Test `save-edl` command.
(tmp_path: Path)
| 914 | |
| 915 | |
| 916 | def 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__} |
| 937 | TITLE: {DEFAULT_VIDEO_NAME} |
| 938 | FCM: NON-DROP FRAME |
| 939 | |
| 940 | 001 AX V C 00:00:02:00 00:00:03:18 00:00:02:00 00:00:03:18 |
| 941 | 002 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 | |
| 946 | def test_cli_save_edl_with_params(tmp_path: Path): |
nothing calls this directly
no test coverage detected