CSV export should work correctly with VFR video.
(test_vfr_video: str, tmp_path)
| 145 | |
| 146 | |
| 147 | def test_vfr_csv_output(test_vfr_video: str, tmp_path): |
| 148 | """CSV export should work correctly with VFR video.""" |
| 149 | from scenedetect.output import write_scene_list |
| 150 | |
| 151 | video = open_video(test_vfr_video, backend="pyav") |
| 152 | sm = SceneManager() |
| 153 | sm.add_detector(ContentDetector()) |
| 154 | sm.detect_scenes(video=video) |
| 155 | scene_list = sm.get_scene_list() |
| 156 | assert len(scene_list) > 0 |
| 157 | |
| 158 | csv_path = os.path.join(str(tmp_path), "scenes.csv") |
| 159 | with open(csv_path, "w", newline="") as f: |
| 160 | write_scene_list(f, scene_list) |
| 161 | |
| 162 | # Verify CSV contains valid data. |
| 163 | with open(csv_path) as f: |
| 164 | reader = csv.reader(f) |
| 165 | rows = list(reader) |
| 166 | assert len(rows) >= 3 # 2 header rows + data |
| 167 | |
| 168 | |
| 169 | @pytest.mark.parametrize("backend", ["pyav", "opencv"]) |
nothing calls this directly
no test coverage detected