Commit dd5e685
Add CLI subcommand tests driving main()
cli.py is the largest module in the package (881 lines) and had a
single test. Drive main() per subcommand via sys.argv, which also
covers the table and manifest rendering helpers through their output:
- argument parsing: no arguments shows the help, an unknown command
exits, and site-only commands are absent without a site context
- read-only commands: path-config-template, template, find (table and
json), inspect (table and json), list, show-all
- the add -> enable -> disable -> release/remove lifecycle against a
real store on tmp_path, asserting the state shown by list
- the error surface: unknown packages return 1 and report to stderr,
and --debug re-raises instead
Change-Id: I15091ec6ec964ecd4f989c759b6546f3720b3e201 parent f3314d2 commit dd5e685
2 files changed
Lines changed: 351 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | | - | |
| 786 | + | |
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
| 865 | + | |
865 | 866 | | |
866 | | - | |
| 867 | + | |
867 | 868 | | |
868 | 869 | | |
869 | 870 | | |
| |||
0 commit comments