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

Function test_cli_save_qp

tests/test_cli.py:726–743  ·  view source on GitHub ↗

Test `save-qp` command with and without a custom filename format.

(tmp_path: Path)

Source from the content-addressed store, hash-verified

724
725
726def test_cli_save_qp(tmp_path: Path):
727 """Test `save-qp` command with and without a custom filename format."""
728 EXPECTED_QP_CONTENTS = """
7290 I -1
73090 I -1
731"""
732 for filename in (None, "custom.txt"):
733 filename_format = f"--filename {filename}" if filename else ""
734 assert (
735 invoke_scenedetect(
736 f"-i {{VIDEO}} time -e 95 {{DETECTOR}} save-qp {filename_format}",
737 output_dir=tmp_path,
738 )
739 == 0
740 )
741 output_path = tmp_path.joinpath(filename if filename else f"{DEFAULT_VIDEO_NAME}.qp")
742 assert os.path.exists(output_path)
743 assert output_path.read_text() == EXPECTED_QP_CONTENTS[1:]
744
745
746def test_cli_save_qp_start_offset(tmp_path: Path):

Callers

nothing calls this directly

Calls 1

invoke_scenedetectFunction · 0.85

Tested by

no test coverage detected