{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/4"}],"enrichment":{"capability":"Adds parametrization support to unittest TestCases, allowing you to run the same test method with multiple sets of inputs without writing duplicate test code.","skillfed_tags":["unittest","test-parametrization","django-testing"],"use_cases":["Test the same logic across a range of inputs (e.g., testing a square function with multiple values) without duplicating test code.","Verify edge cases and boundary conditions by running a single test method with different parameter sets.","Generate readable test reports with custom test names via param IDs, making failures easier to trace.","Integrate parametrized tests into Django projects by mixing ParametrizedTestCase into your project's base test case classes.","Run parametrized tests across different test runners (unittest, pytest, Django) without rewriting test code."],"what_it_does":"unittest-parametrize is a decorator-based library that brings pytest-style parametrization to the standard unittest framework. It lets you write a single test method and run it multiple times with different input values, generating separate named test cases for each parameter set. The decorator works by modifying the test class at definition time using Python's __init_subclass__ hook, creating individual wrapped copies of your test method with unique names\u2014so the parametrization works with any test runner (unittest, Django's test runner, pytest, etc.) and supports both synchronous and asynchronous test methods.\n\nThe library mirrors pytest's @pytest.mark.parametrize API closely, accepting argument names as a comma-separated string or sequence, a list of parameter tuples or param objects, and optional custom test ID suffixes. You inherit from ParametrizedTestCase in your test class and apply @parametrize to any test methods you want to parametrize. It handles single parameters without tuple wrapping, multiple parameters, and custom naming via param IDs, a sequence of ID strings, or a callable.","worth_installing":"Yes. unittest-parametrize is a lightweight, actively maintained tool that solves a genuine pain point in unittest\u2014the lack of native parametrization. It has no security vulnerabilities, minimal dependencies, and works across modern Python versions. If you use unittest or Django's test runner and want to avoid duplicating test code for multiple inputs, it's a straightforward win."},"id":"unittest-parametrize","links":{"html":"https://skillfed.io/packages/unittest-parametrize","md":"https://skillfed.io/packages/unittest-parametrize.md","pypi":"https://pypi.org/project/unittest-parametrize/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-09-09","license_spdx":"MIT","license_treatment":"permissive","name":"unittest-parametrize","python_support":"supports_current","summary":"Parametrize tests within unittest TestCases."},"popularity":{"monthly_downloads":247393,"position":8693,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.8.0"}
