| 33 | |
| 34 | @pytest.mark.release |
| 35 | def test_cli_chain_smoke(test_video_file, tmp_path): |
| 36 | # detect-content save-images list-scenes chain. |
| 37 | result = _run( |
| 38 | [ |
| 39 | "-i", |
| 40 | os.path.abspath(test_video_file), |
| 41 | "-o", |
| 42 | str(tmp_path), |
| 43 | "detect-content", |
| 44 | "save-images", |
| 45 | "list-scenes", |
| 46 | ], |
| 47 | cwd=os.path.abspath(os.path.dirname(test_video_file) + "/../.."), |
| 48 | ) |
| 49 | assert result.returncode == 0, f"stderr:\n{result.stderr}\nstdout:\n{result.stdout}" |
| 50 | csvs = [p for p in tmp_path.iterdir() if p.suffix == ".csv"] |
| 51 | images = [p for p in tmp_path.iterdir() if p.suffix == ".jpg"] |
| 52 | assert csvs, "No scenes CSV produced" |
| 53 | assert images, "No scene images produced" |
| 54 | |
| 55 | |
| 56 | @pytest.mark.release |