tools

December 22, 2025 ยท View on GitHub

Test case runner for debugging and development.

Subcommands

CommandDescription
run-caseRun test cases and output pytest stdout

run-case

Run pytest tests for a snapshot and output raw stdout.

Quick Start

slop-code tools run-case \
  -s outputs/my_run/file_backup/checkpoint_1/snapshot \
  -p file_backup \
  -c 1 \
  -e configs/environments/docker-python3.12-uv.yaml

Usage

slop-code tools run-case [OPTIONS]

Options

OptionTypeDefaultDescription
-s, --snapshot-dirpathrequiredPath to snapshot directory
-p, --problemstringrequiredName of the problem
-c, --checkpointintrequiredCheckpoint number
-e, --env-configpathrequiredPath to environment configuration
--casestring-Pytest -k expression to select tests
--pytest-argstring-Extra args to pass to pytest (repeatable)
--jsonflagfalseOutput JSON report instead of raw pytest stdout
--fullflagfalseInclude full JSON report payload (implies --json)

Output

Default output: Raw pytest stdout.

JSON output (--json): Per-test JSON summaries.

Full JSON output (--full): Complete report with all attributes and debug info.

Examples

# Run all tests
slop-code tools run-case \
  -s outputs/snapshot \
  -p file_backup \
  -c 1 \
  -e configs/environments/docker-python3.12-uv.yaml

# Run specific tests with -k filter
slop-code tools run-case \
  -s outputs/snapshot \
  -p file_backup \
  -c 1 \
  -e configs/environments/docker-python3.12-uv.yaml \
  --case "test_backup"

# JSON output
slop-code tools run-case \
  -s outputs/snapshot \
  -p file_backup \
  -c 1 \
  -e configs/environments/docker-python3.12-uv.yaml \
  --json

# Full JSON output with debug info
slop-code tools run-case \
  -s outputs/snapshot \
  -p file_backup \
  -c 1 \
  -e configs/environments/docker-python3.12-uv.yaml \
  --full

# Pass extra pytest args
slop-code tools run-case \
  -s outputs/snapshot \
  -p file_backup \
  -c 1 \
  -e configs/environments/docker-python3.12-uv.yaml \
  --pytest-arg "-v" \
  --pytest-arg "--tb=short"

See Also