Skip to content

test(validation): property-based tests for template expansion (B4.1)#219

Draft
JarbasAl wants to merge 1 commit into
devfrom
test/validation-properties
Draft

test(validation): property-based tests for template expansion (B4.1)#219
JarbasAl wants to merge 1 commit into
devfrom
test/validation-properties

Conversation

@JarbasAl

Copy link
Copy Markdown
Member

Adds hypothesis property tests for expand_template — the core of intent/vocab validation — asserting invariants that must hold for any well-formed template, not just examples:

  • plain text expands to exactly its normalized self
  • every {slot} is preserved in every expansion
  • no group delimiters ()[] remain in output
  • expansion is idempotent on already-expanded lines
  • (a|b|c) yields exactly one line per distinct alternative
  • a [b] yields both the with- and without-optional forms

Declares hypothesis>=6.0 as a dev dependency.

Local: pytest test/unittests/test_bracket_expansion_properties.py → 6 passed.

Add hypothesis property tests asserting expand_template invariants for any
well-formed template: plain-text identity, slot preservation across every
expansion, full bracket elimination, idempotence, and alternation cardinality.
Declares hypothesis as a dev dependency.
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: aabc3fba-caa5-4338-b5c0-e30fd2025e3d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/validation-properties

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant