Skip to content

Commit 71626a9

Browse files
committed
[test]: add basic unit test for the generic pipeline runner
1 parent 53ceb6e commit 71626a9

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import subprocess
2+
import sys
3+
4+
def test_runner_help():
5+
# Run the runner with --help to ensure it parses arguments correctly
6+
# and doesn't have any syntax errors or missing imports.
7+
result = subprocess.run(
8+
[sys.executable, "-m", "fastvideo.training.runner", "--help"],
9+
capture_output=True,
10+
text=True
11+
)
12+
13+
# Check if the process completed successfully
14+
assert result.returncode == 0, f"Runner failed with exit code {result.returncode}.\nStderr: {result.stderr}"
15+
16+
# Check if help output is printed
17+
assert "--pipeline_class" in result.stdout
18+
assert "--pipeline_module" in result.stdout

0 commit comments

Comments
 (0)