(test_video_file, tmp_path)
| 67 | |
| 68 | @pytest.mark.release |
| 69 | def test_output_image_extensions(test_video_file, tmp_path): |
| 70 | if not HAS_PIL: |
| 71 | pytest.skip("Pillow not installed.") |
| 72 | video, scene_list = _detect(test_video_file) |
| 73 | # Limit to the first two scenes to keep the test fast. |
| 74 | scene_list = scene_list[:2] |
| 75 | |
| 76 | for ext in ("jpg", "png", "webp"): |
| 77 | out_dir = tmp_path / f"images_{ext}" |
| 78 | out_dir.mkdir() |
| 79 | save_images( |
| 80 | scene_list, |
| 81 | video, |
| 82 | num_images=1, |
| 83 | output_dir=str(out_dir), |
| 84 | image_extension=ext, |
| 85 | show_progress=False, |
| 86 | ) |
| 87 | files = [p for p in out_dir.iterdir() if p.suffix == f".{ext}"] |
| 88 | assert files, f"No {ext} images produced" |
| 89 | for p in files: |
| 90 | with Image.open(p) as img: |
| 91 | img.verify() |
| 92 | assert img.size[0] > 0 and img.size[1] > 0 |
| 93 | |
| 94 | |
| 95 | @pytest.mark.release |
nothing calls this directly
no test coverage detected