Property-Based Utility TestsΒΆ
OverviewΒΆ
tests/test_property_based.py
uses Hypothesis
for property-based validation of the utility helpers in ezpz.utils
. The suite
runs only when both ezpz.utils
and Hypothesis are available and skips
otherwise, making it safe for constrained environments.
HighlightsΒΆ
- Idempotent normalisation β Repeated calls to
utils.normalize
must return the same value for any input string. - Lowercase guarantee β Normalised identifiers are forced to lowercase while preserving valid characters.
- Identifier validity β Ensures the output contains only alphanumeric characters or dashes.
- Formatted pairs β Confirms
utils.format_pair
produces stable string representations for floats with the requested precision.
Running the TestsΒΆ
Tip: Install Hypothesis via
pip install hypothesis
if it is not already present in your development environment.