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.normalizemust 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_pairproduces stable string representations for floats with the requested precision.
Running the Testsโ๏ธ
Tip: Install Hypothesis via
pip install hypothesisif it is not already present in your development environment.