{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/6"}],"enrichment":{"capability":"Provides a helper class for regex assertions that shows exactly where and why a pattern match failed, integrating with pytest and other test frameworks.","skillfed_tags":["regex-testing","pytest-plugin","assertion-helper"],"use_cases":["Write pytest tests for regex patterns with clear failure messages showing exactly where the match failed.","Debug regex patterns during development by seeing the precise mismatch point instead of a generic False result.","Test compiled regex objects from existing code without rewriting the pattern as a string.","Use in non-pytest test frameworks via the assert_matches() method for readable regex validation errors.","Validate input patterns in data pipelines where regex failures need to be quickly diagnosed."],"what_it_does":"re-assert wraps regex pattern matching to provide readable failure diagnostics in test assertions. When a pattern fails to match, it shows the exact position in the input string where the match broke down, with visual markers pointing to the failure point. This is especially useful in pytest, where the overridden equality operator integrates directly into assertion output; for other test frameworks, the `assert_matches()` method produces similarly clear tracebacks.\n\nUnder the hood, re-assert uses the regex library (which is a drop-in replacement for Python's built-in re module) to compile and match patterns. You construct a Matches object with a pattern string or an already-compiled regex, then use it like a normal value in equality assertions or call `assert_matches()` directly. The library is designed to be lightweight and requires only the regex dependency.","worth_installing":"Yes. It is a focused, well-maintained tool with no security issues, low install friction, and a permissive license. If you write regex-based tests in pytest or other frameworks, it directly improves test readability and debugging speed with minimal overhead."},"id":"re-assert","links":{"html":"https://skillfed.io/packages/re-assert","md":"https://skillfed.io/packages/re-assert.md","pypi":"https://pypi.org/project/re-assert/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2020-02-25","license_spdx":null,"license_treatment":"permissive","name":"re-assert","python_support":"supports_current","summary":"show where your regex match assertion failed!"},"popularity":{"monthly_downloads":80461,"position":14290,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.1.0"}
