`--framerate` is the soft-deprecated hidden alias for `-f/--frame-rate` (issue #548). Both forms must be accepted; passing both should not error.
()
| 336 | |
| 337 | |
| 338 | def test_cli_framerate_legacy_alias(): |
| 339 | """`--framerate` is the soft-deprecated hidden alias for `-f/--frame-rate` (issue #548). |
| 340 | Both forms must be accepted; passing both should not error.""" |
| 341 | # Canonical form. |
| 342 | exit_code, _ = invoke_cli( |
| 343 | ["-i", DEFAULT_VIDEO_PATH, "--frame-rate", "30.0", "time", "-s", "2s", "-d", "4s"] |
| 344 | ) |
| 345 | assert exit_code == 0 |
| 346 | # Legacy form. |
| 347 | exit_code, _ = invoke_cli( |
| 348 | ["-i", DEFAULT_VIDEO_PATH, "--framerate", "30.0", "time", "-s", "2s", "-d", "4s"] |
| 349 | ) |
| 350 | assert exit_code == 0 |
| 351 | # Both forms together: `--frame-rate` wins, a warning is logged but no error. |
| 352 | exit_code, _ = invoke_cli( |
| 353 | [ |
| 354 | "-i", |
| 355 | DEFAULT_VIDEO_PATH, |
| 356 | "--frame-rate", |
| 357 | "30.0", |
| 358 | "--framerate", |
| 359 | "24.0", |
| 360 | "time", |
| 361 | "-s", |
| 362 | "2s", |
| 363 | "-d", |
| 364 | "4s", |
| 365 | ] |
| 366 | ) |
| 367 | assert exit_code == 0 |
| 368 | |
| 369 | |
| 370 | def test_cli_min_scene_len_accepts_all_timecode_forms(tmp_path: Path): |
nothing calls this directly
no test coverage detected