Commit Graph

2 Commits

Author SHA1 Message Date
Gavin Colonese
59aed24d05 refactor: use pathlib for file paths in new export handlers
CONTRIBUTING.md mandates pathlib.Path over os.path (added for
cross-platform/Linux support); the rest of the codebase's newer code
already follows it. Converts the 19 new _handle_export_* handlers to
pathlib (exists/mkdir/iterdir/is_file, expanduser().resolve()) so this
feature's new code is compliant. Tests updated to patch pathlib.Path.

Scope is limited to the new export-handler block; the pre-existing
os.path usage elsewhere in kicad_interface.py/export.py is untouched
here and will be migrated in a dedicated refactor PR to keep that
sweep reviewable in isolation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 11:17:57 -04:00
Gavin Colonese
605dac7fd3 test: add unit coverage for kicad-cli export handlers
Covers all 19 new _handle_export_* handlers: parametrized success /
kicad-cli-not-found / subprocess-failure paths, plus validation
(missing output, unresolvable board, missing schematicPath) and
detailed flag-construction assertions for gerbers/drill/ipc2581.
Subprocess + filesystem are mocked; no real kicad-cli or board touched.
64 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 11:06:24 -04:00