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

Function test_cli_save_images

tests/test_cli.py:601–615  ·  view source on GitHub ↗

Test `save-images` command.

(tmp_path: Path)

Source from the content-addressed store, hash-verified

599
600
601def test_cli_save_images(tmp_path: Path):
602 """Test `save-images` command."""
603 assert (
604 invoke_scenedetect(
605 "-i {VIDEO} -s {STATS} time {TIME} {DETECTOR} save-images", output_dir=tmp_path
606 )
607 == 0
608 )
609 images = [image for image in tmp_path.glob("*.jpg")]
610 # Should detect two scenes and generate 3 images per scene with above params.
611 assert len(images) == 6
612 # Open one of the created images and make sure it has the correct resolution.
613 image = cv2.imread(str(images[0]))
614 assert image is not None
615 assert image.shape == (544, 1280, 3)
616
617
618def test_cli_save_images_path_handling(tmp_path: Path):

Callers

nothing calls this directly

Calls 1

invoke_scenedetectFunction · 0.85

Tested by

no test coverage detected