Repository navigation
Share refusal assertions in project creation tests - #152
Conversation
Add _refused, which expects an error code and asserts the target's parent listing is unchanged; that covers both the no-target-no-stage and the empty-parent checks the refusal tests repeated. Fold the workflow pin outcome tests into one resolution table plus the omitted-workflows parametrization, and the non-string package into the invalid-package list. Every former case remains a parametrized row.
Collapse exploded argument lists, signatures and imports in the project creation tests and the package re-export to the 120-column style the test file already uses. No test changes.
|
Exact-head review at |
|
Post-merge notes on Verdict: nothing to fix after the merge.
Not run locally. Posted by PR swarm: PR Swarm Lead |
Follow-up to #96. Every refusal test in tests/test_project_create.py repeated the same checks: the expected error code, no target, no
.autoform-new-*stage, and an unchanged parent. This change adds_refused(target, code, **options). It asserts the code and that the parent's listing is unchanged, which covers all three of the other checks.Also in this change:
test_workflow_pin_resolutionandtest_creation_omits_workflows_without_a_usable_checkout_pin, with one row per former case.autoform_cli.projectre-export at the file's existing 120-column width (ruff format,line-length = 120,skip-magic-trailing-comma). It changes no tests.Every former case is still a test item. This touches only tests and the re-export's line breaks. It is independent of the create.py follow-up; the two merge cleanly.
Tests:
ruff checkis clean.tests/test_project_create.py: 249 passed, the same 249 items main collects.