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

Function test_cli_legacy_v06_config_file

tests/test_cli.py:707–723  ·  view source on GitHub ↗

A v0.6-era scenedetect.cfg using the deprecated `[export-html]` section must still load in v0.7. The parser maps `[export-html]` -> `[save-html]` (via DEPRECATED_COMMANDS in scenedetect/_cli/config.py) and emits a deprecation warning on load. This is the most likely silent break for user

(tmp_path: Path)

Source from the content-addressed store, hash-verified

705
706
707def test_cli_legacy_v06_config_file(tmp_path: Path):
708 """A v0.6-era scenedetect.cfg using the deprecated `[export-html]` section must still load
709 in v0.7. The parser maps `[export-html]` -> `[save-html]` (via DEPRECATED_COMMANDS in
710 scenedetect/_cli/config.py) and emits a deprecation warning on load. This is the most
711 likely silent break for users upgrading config files; the option set under both sections
712 is identical."""
713 legacy_cfg = tmp_path / "scenedetect.cfg"
714 legacy_cfg.write_text(
715 # Mix of unchanged sections and the renamed `[export-html]` section.
716 "[global]\nmin-scene-len = 0.6s\n\n"
717 "[detect-content]\nthreshold = 27\n\n"
718 "[export-html]\nfilename = $VIDEO_NAME-Scenes.html\nno-images = yes\n"
719 )
720 exit_code, output = invoke_cli(
721 ["-c", str(legacy_cfg), "-i", DEFAULT_VIDEO_PATH, "time", "-s", "2s", "-d", "1s"],
722 )
723 assert exit_code == 0, f"v0.6-style config rejected:\n{output}"
724
725
726def test_cli_save_qp(tmp_path: Path):

Callers

nothing calls this directly

Calls 1

invoke_cliFunction · 0.90

Tested by

no test coverage detected