Skip to content

Add exit code tests for CLI error paths #383

@seayang-nv

Description

@seayang-nv

Priority Level

Medium

Task Summary

The CLI correctly returns non-zero exit codes for most error paths (run, config, artifacts), but this behavior is largely untested. The only error-path exit code tests are in test_artifacts.py (added in the recent fix, PR #359 ) and one case in test_run.py (generate without --run-path).

We should add tests asserting non-zero exit codes for common failure modes to prevent regressions:

  • run --data-source missing.csv — nonexistent dataset file
  • run with no --data-source — missing required input for new runs
  • config validate --config nonexistent.yaml — nonexistent config file
  • config validate --config malformed.yaml — invalid config (ValidationError)
  • run generate --run-path /nonexistent — bad resume path
  • run --data-source bad_url.txt — unsupported or unreachable data source

Each test should use CliRunner and assert result.exit_code != 0.

Technical Details & Implementation Plan

No response

Dependencies

No response

Metadata

Metadata

Assignees

Labels

taskDevelopment task

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions