Test each detection algorithm with a statsfile.
(tmp_path, detector_command: str)
| 313 | |
| 314 | @pytest.mark.parametrize("detector_command", ALL_DETECTORS) |
| 315 | def test_cli_detector_with_stats(tmp_path, detector_command: str): |
| 316 | """Test each detection algorithm with a statsfile.""" |
| 317 | # Run with a statsfile twice to ensure the file is populated with those metrics and reloaded. |
| 318 | assert ( |
| 319 | invoke_scenedetect( |
| 320 | "-i {VIDEO} -s {STATS} time {TIME} {DETECTOR}", |
| 321 | output_dir=tmp_path, |
| 322 | DETECTOR=detector_command, |
| 323 | ) |
| 324 | == 0 |
| 325 | ) |
| 326 | assert ( |
| 327 | invoke_scenedetect( |
| 328 | "-i {VIDEO} -s {STATS} time {TIME} {DETECTOR}", |
| 329 | output_dir=tmp_path, |
| 330 | DETECTOR=detector_command, |
| 331 | ) |
| 332 | == 0 |
| 333 | ) |
| 334 | # TODO: Check for existence of statsfile by trying to load it with the library, |
| 335 | # and ensuring that we got some frames. |
| 336 | |
| 337 | |
| 338 | def test_cli_framerate_legacy_alias(): |
nothing calls this directly
no test coverage detected