Test `list-scenes` command.
(tmp_path: Path)
| 409 | |
| 410 | |
| 411 | def test_cli_list_scenes(tmp_path: Path): |
| 412 | """Test `list-scenes` command.""" |
| 413 | exit_code, _ = invoke_cli( |
| 414 | [ |
| 415 | "-i", |
| 416 | DEFAULT_VIDEO_PATH, |
| 417 | "-o", |
| 418 | str(tmp_path), |
| 419 | "time", |
| 420 | "-s", |
| 421 | "2s", |
| 422 | "-d", |
| 423 | "4s", |
| 424 | "detect-content", |
| 425 | "list-scenes", |
| 426 | ] |
| 427 | ) |
| 428 | assert exit_code == 0 |
| 429 | output_path = tmp_path.joinpath(f"{DEFAULT_VIDEO_NAME}-Scenes.csv") |
| 430 | assert os.path.exists(output_path) |
| 431 | EXPECTED_CSV_OUTPUT = """Timecode List:,00:00:03.754 |
| 432 | Scene Number,Start Frame,Start Timecode,Start Time (seconds),End Frame,End Timecode,End Time (seconds),Length (frames),Length (timecode),Length (seconds) |
| 433 | 1,49,00:00:02.002,2.002,90,00:00:03.754,3.754,42,00:00:01.752,1.752 |
| 434 | 2,91,00:00:03.754,3.754,144,00:00:06.006,6.006,54,00:00:02.252,2.252 |
| 435 | """ |
| 436 | assert output_path.read_text() == EXPECTED_CSV_OUTPUT |
| 437 | |
| 438 | |
| 439 | def test_cli_list_scenes_skip_cuts(tmp_path: Path): |
nothing calls this directly
no test coverage detected