MCPcopy Index your code
hub / github.com/Breakthrough/PySceneDetect / test_cli_detector_with_stats

Function test_cli_detector_with_stats

tests/test_cli.py:315–335  ·  view source on GitHub ↗

Test each detection algorithm with a statsfile.

(tmp_path, detector_command: str)

Source from the content-addressed store, hash-verified

313
314@pytest.mark.parametrize("detector_command", ALL_DETECTORS)
315def test_cli_detector_with_stats(tmp_path, detector_command: str):
316 """Test each detection algorithm with a statsfile."""
317 # Run with a statsfile twice to ensure the file is populated with those metrics and reloaded.
318 assert (
319 invoke_scenedetect(
320 "-i {VIDEO} -s {STATS} time {TIME} {DETECTOR}",
321 output_dir=tmp_path,
322 DETECTOR=detector_command,
323 )
324 == 0
325 )
326 assert (
327 invoke_scenedetect(
328 "-i {VIDEO} -s {STATS} time {TIME} {DETECTOR}",
329 output_dir=tmp_path,
330 DETECTOR=detector_command,
331 )
332 == 0
333 )
334 # TODO: Check for existence of statsfile by trying to load it with the library,
335 # and ensuring that we got some frames.
336
337
338def test_cli_framerate_legacy_alias():

Callers

nothing calls this directly

Calls 1

invoke_scenedetectFunction · 0.85

Tested by

no test coverage detected