{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/5"},{"label":"Internet","url":"https://skillfed.io/packages/category/internet/2"}],"enrichment":{"capability":"Provides custom equality matchers that make unit test assertions more declarative by allowing flexible comparisons of complex data structures without modifying the values being tested.","skillfed_tags":["test-assertion","api-testing","declarative"],"use_cases":["Validate API response payloads without hardcoding exact values you don't control (timestamps, IDs, file paths).","Compare database query results where you only care about certain fields or partial structure matches.","Write readable assertions for JSON data by comparing the parsed structure rather than string matching.","Test that response fields are the correct type without brittle exact-value checks.","Combine multiple validation rules (e.g., 'must be a string AND match this pattern') in a single assertion."],"what_it_does":"dirty-equals is a testing library that overloads Python's `__eq__` method to create reusable matcher objects for assertions. Instead of manually checking individual fields or modifying data before comparison, you write assertions that read like specifications: a field must be a positive integer, match a regex, contain specific JSON, or fall within a time window. This makes test code more declarative and maintainable, especially when validating API responses or database records with many fields.\n\nThe library provides matchers for common patterns (type checks, regex matching, partial collections, JSON parsing, timestamp proximity) and supports combining conditions with boolean operators. It has no runtime dependencies, installs cleanly as a pure Python wheel, and is actively maintained with support for Python 3.9 through 3.14.","worth_installing":"Yes. dirty-equals is a low-friction, actively maintained testing utility with no dependencies that directly improves test readability and reduces boilerplate in assertion-heavy codebases. It is especially valuable for API and database testing where exact values are unknown or irrelevant. MIT license and broad Python version support make it safe to adopt."},"id":"dirty-equals","links":{"html":"https://skillfed.io/packages/dirty-equals","md":"https://skillfed.io/packages/dirty-equals.md","pypi":"https://pypi.org/project/dirty-equals/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-11-17","license_spdx":"MIT","license_treatment":"permissive","name":"dirty-equals","python_support":"supports_current","summary":"Doing dirty (but extremely useful) things with equals."},"popularity":{"monthly_downloads":2952300,"position":2808,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.11"}
