{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/2"},{"label":"Unit","url":"https://skillfed.io/packages/category/software-development-testing-unit"}],"enrichment":{"capability":"Provides matcher objects that compare equal to values meeting specified criteria, enabling flexible assertions in pytest-style unit tests without manual field-by-field comparison.","skillfed_tags":["pytest","test-utilities","assertion-helpers"],"use_cases":["Assert that API responses contain valid timestamps or UUIDs without hardcoding exact values.","Validate nested data structures where some fields are dynamic but must meet type or pattern constraints.","Check that function return values fall within expected numeric ranges without manual boundary comparisons.","Test objects with attributes that vary between runs (e.g., creation times) while verifying other fields exactly.","Combine multiple criteria to match complex values\u2014e.g., strings matching a regex AND containing a substring."],"what_it_does":"anys is a testing utility that provides matcher objects for writing more flexible assertions in unit tests. Instead of comparing exact values, matchers let you assert that a value meets a criterion\u2014such as being a valid ISO 8601 datetime string, falling within a numeric range, matching a regex pattern, or having specific attributes. This is especially useful when testing code that produces values you can't predict in advance (like timestamps or generated IDs) but still need to validate.\n\nThe package exports pre-built matchers for common types (ANY_INT, ANY_STR, ANY_DATETIME_STR, etc.) and composable matcher classes (AnyGT, AnyMatch, AnyWithAttrs, etc.) that you combine with standard Python equality comparisons. Matchers can be nested in dictionaries, lists, and other structures, and combined using & (both must match) and | (either may match) operators. It has no runtime dependencies and supports Python 3.8 through 3.13 on both CPython and PyPy.","worth_installing":"Yes. This is a lightweight, well-maintained testing utility with no dependencies, permissive licensing, and active development. It solves a real problem in unit testing\u2014validating dynamic or partially-known values\u2014and integrates seamlessly with pytest assertions. The API is straightforward, and the matcher composition model is flexible. Install it if you write tests with pytest and encounter fields you can't assert exactly."},"id":"anys","links":{"html":"https://skillfed.io/packages/anys","md":"https://skillfed.io/packages/anys.md","pypi":"https://pypi.org/project/anys/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2024-12-01","license_spdx":null,"license_treatment":"permissive","name":"anys","python_support":"supports_current","summary":"Matchers for pytest"},"popularity":{"monthly_downloads":953611,"position":4650,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.3.1"}
