Skip to content

test(cli): retire the tuple-assert mandate and detect opaque tuple asserts and presence-only tests (#851) - #2111

Merged
dan-petty merged 1 commit into
mainfrom
test/851-retire-tuple-assert-mandate
Oct 24, 2026
Merged

dan-petty merged 1 commit into
mainfrom
test/851-retire-tuple-assert-mandate

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary

Retire the tuple-assert mandate from repo instructions and enforce concrete assertions across test suites.

  • Select Ruff rule PT018 and enforce it via CONST_TEST_ASSERTION_LINT_RULES.
  • Define CONST_PRESENCE_CHECK_NAMES = frozenset({"callable", "hasattr", "isinstance"}) in src/devops_cli/config/constants.py.
  • Add _opaque_or_presence_assertions invariant to test_no_test_certifies_a_failure_without_checking_it in tests/test_architectural_invariants.py.
  • Rewrite presence-only and opaque tuple assertions across test files to verify concrete values and object identity.

Item

Closes #851

Change: openspec/changes/archive/2026-10-24-851-retire-tuple-assert-mandate/

…serts and presence-only tests (#851)

Retire the tuple-assert mandate from repo instructions and enforce
concrete assertions across test suites.

Select Ruff rule PT018 and enforce it via CONST_TEST_ASSERTION_LINT_RULES.
Define CONST_PRESENCE_CHECK_NAMES and add _opaque_or_presence_assertions
invariant to test_no_test_certifies_a_failure_without_checking_it.
Rewrite presence-only and opaque tuple assertions across test files to
verify concrete values and object identity.

Closes #851

Change: openspec/changes/archive/2026-10-24-851-retire-tuple-assert-mandate/
@dan-petty
dan-petty marked this pull request as ready for review October 24, 2026 14:18
@dan-petty
dan-petty merged commit 3890adf into main Oct 24, 2026
17 checks passed
@dan-petty
dan-petty deleted the test/851-retire-tuple-assert-mandate branch October 24, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(cli): retire the tuple-assert mandate and detect opaque tuple asserts and presence-only tests

1 participant