Test `save-images` command.
(tmp_path: Path)
| 599 | |
| 600 | |
| 601 | def 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 | |
| 618 | def test_cli_save_images_path_handling(tmp_path: Path): |
nothing calls this directly
no test coverage detected