tofusoup 2025-06-01
Refactored Python infrastructure and fixed CLI test diagnostics
7 files · 660+ · 273-

CLI path resolution and error reporting

1 file changed
  • cli.py Fixed PROJECT_ROOT calculation to traverse three levels up instead of two; corrected py_generator_script path to use PROJECT_ROOT/src/ctytest; improved error messages with .resolve() for absolute paths
  • Fixed PROJECT_ROOT to resolve correctly from src/ctytest/ to the actual project root remediate behavioral
    1 file
    • cli.py
  • Corrected env.sh path lookup and shell command construction for Python generator invocation remediate behavioral
    1 file
    • cli.py
  • Added GO_SRC_DIR existence check before attempting build or generate operations harden behavioral
    1 file
    • cli.py

Test diagnostics and compatibility improvements

4 files changed
  • test_cli_commands.py Fixed InvalidSpecError by correcting test module imports; expanded test coverage with better assertions
  • test_cty_compatibility.py Adjusted compatibility test expectations after path changes
  • py_cty_generator.py Minor adjustments to generator output formatting
  • utils.py Added utility function
  • Resolved test collection failures caused by stale path references after PROJECT_ROOT fix remediate behavioral
    1 file
    • test_cli_commands.py