Verify we can use `load-scenes` and get the same scenes as output with `list-scenes`.
()
| 862 | |
| 863 | |
| 864 | def test_cli_load_scenes_round_trip(): |
| 865 | """Verify we can use `load-scenes` and get the same scenes as output with `list-scenes`.""" |
| 866 | scenes_csv = """ |
| 867 | Scene Number,Start Frame |
| 868 | 1,49 |
| 869 | 2,91 |
| 870 | 3,211 |
| 871 | """ |
| 872 | with open("test_scene_list.csv", "w") as f: |
| 873 | f.write(scenes_csv) |
| 874 | ground_truth = subprocess.check_output( |
| 875 | [ |
| 876 | *SCENEDETECT_CMD.split(" "), |
| 877 | "-i", |
| 878 | DEFAULT_VIDEO_PATH, |
| 879 | "detect-content", |
| 880 | "list-scenes", |
| 881 | "-f", |
| 882 | "testout.csv", |
| 883 | "time", |
| 884 | "-s", |
| 885 | "200", |
| 886 | "-e", |
| 887 | "400", |
| 888 | ], |
| 889 | text=True, |
| 890 | ) |
| 891 | loaded_first_pass = subprocess.check_output( |
| 892 | [ |
| 893 | *SCENEDETECT_CMD.split(" "), |
| 894 | "-i", |
| 895 | DEFAULT_VIDEO_PATH, |
| 896 | "load-scenes", |
| 897 | "-i", |
| 898 | "testout.csv", |
| 899 | "time", |
| 900 | "-s", |
| 901 | "200", |
| 902 | "-e", |
| 903 | "400", |
| 904 | "list-scenes", |
| 905 | "-f", |
| 906 | "testout2.csv", |
| 907 | ], |
| 908 | text=True, |
| 909 | ) |
| 910 | SPLIT_POINT = " | Scene # | Start Frame | Start Time | End Frame | End Time |" |
| 911 | assert ground_truth.split(SPLIT_POINT)[1] == loaded_first_pass.split(SPLIT_POINT)[1] |
| 912 | with open("testout.csv") as first, open("testout2.csv") as second: |
| 913 | assert first.readlines() == second.readlines() |
| 914 | |
| 915 | |
| 916 | def test_cli_save_edl(tmp_path: Path): |
nothing calls this directly
no outgoing calls
no test coverage detected