MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / test_output_csv_roundtrip

Function test_output_csv_roundtrip

tests/release/test_validation.py:55–65  ·  view source on GitHub ↗
(test_video_file, tmp_path)

Source from the content-addressed store, hash-verified

53
54@pytest.mark.release
55def test_output_csv_roundtrip(test_video_file, tmp_path):
56 _video, scene_list = _detect(test_video_file)
57 csv_path = str(tmp_path / "scenes.csv")
58 with open(csv_path, "w", newline="") as f:
59 write_scene_list(f, scene_list, include_cut_list=False)
60
61 with open(csv_path) as f:
62 rows = list(csv.DictReader(f))
63 assert len(rows) == len(scene_list)
64 # write_scene_list emits 1-based start frames; reverse the offset.
65 assert int(rows[0]["Start Frame"]) - 1 == scene_list[0][0].frame_num
66
67
68@pytest.mark.release

Callers

nothing calls this directly

Calls 2

write_scene_listFunction · 0.90
_detectFunction · 0.70

Tested by

no test coverage detected