Verify we can use `load-scenes` with the `time` command and get the desired output.
()
| 820 | |
| 821 | |
| 822 | def test_cli_load_scenes_output(): |
| 823 | """Verify we can use `load-scenes` with the `time` command and get the desired output.""" |
| 824 | scenes_csv = """ |
| 825 | Scene Number,Start Frame |
| 826 | 1,49 |
| 827 | 2,91 |
| 828 | 3,211 |
| 829 | """ |
| 830 | with open("test_scene_list.csv", "w") as f: |
| 831 | f.write(scenes_csv) |
| 832 | output = subprocess.check_output( |
| 833 | [ |
| 834 | *SCENEDETECT_CMD.split(" "), |
| 835 | "-i", |
| 836 | DEFAULT_VIDEO_PATH, |
| 837 | "load-scenes", |
| 838 | "-i", |
| 839 | "test_scene_list.csv", |
| 840 | "time", |
| 841 | "-s", |
| 842 | "2s", |
| 843 | "-e", |
| 844 | "10s", |
| 845 | "list-scenes", |
| 846 | ], |
| 847 | text=True, |
| 848 | ) |
| 849 | assert ( |
| 850 | """ |
| 851 | ----------------------------------------------------------------------- |
| 852 | | Scene # | Start Frame | Start Time | End Frame | End Time | |
| 853 | ----------------------------------------------------------------------- |
| 854 | | 1 | 49 | 00:00:02.002 | 90 | 00:00:03.754 | |
| 855 | | 2 | 91 | 00:00:03.754 | 210 | 00:00:08.759 | |
| 856 | | 3 | 211 | 00:00:08.759 | 240 | 00:00:10.010 | |
| 857 | ----------------------------------------------------------------------- |
| 858 | """ |
| 859 | in output |
| 860 | ) |
| 861 | assert "00:00:03.754,00:00:08.759" in output |
| 862 | |
| 863 | |
| 864 | def test_cli_load_scenes_round_trip(): |
nothing calls this directly
no outgoing calls
no test coverage detected