All backends must open videos at non-ASCII filesystem paths. This is a silent failure mode on platforms with mbcs default codecs; the failure mode is "video just won't open" rather than a clear error. Worth a release-level smoke test.
(test_video_file, tmp_path)
| 123 | |
| 124 | @pytest.mark.release |
| 125 | def test_input_path_unicode(test_video_file, tmp_path): |
| 126 | """All backends must open videos at non-ASCII filesystem paths. This is a silent failure |
| 127 | mode on platforms with mbcs default codecs; the failure mode is "video just won't open" |
| 128 | rather than a clear error. Worth a release-level smoke test.""" |
| 129 | nonascii_dir = tmp_path / "vidéos日本語" |
| 130 | nonascii_dir.mkdir() |
| 131 | nonascii_video = nonascii_dir / "café_テスト.mp4" |
| 132 | shutil.copy(test_video_file, nonascii_video) |
| 133 | |
| 134 | for backend in ("opencv", "pyav"): |
| 135 | try: |
| 136 | video = open_video(str(nonascii_video), backend=backend) |
| 137 | except Exception as exc: |
| 138 | pytest.fail(f"Failed to open non-ASCII path {nonascii_video} via {backend}: {exc}") |
| 139 | sm = SceneManager() |
| 140 | sm.add_detector(ContentDetector()) |
| 141 | sm.detect_scenes(video) |
| 142 | # Detection should succeed end-to-end; we don't care about the exact scene count, just |
| 143 | # that the backend made it through the read loop without bailing out silently. |
| 144 | assert video.frame_number > 0, ( |
| 145 | f"Backend {backend} read 0 frames from {nonascii_video} - silent path-decode failure?" |
| 146 | ) |
| 147 | |
| 148 | |
| 149 | @pytest.mark.release |
nothing calls this directly
no test coverage detected