{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/10"},{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/6"},{"label":"Unit","url":"https://skillfed.io/packages/category/software-development-testing-unit"}],"enrichment":{"capability":"Provides a `@parametrize` decorator that works with `unittest.TestCase` to run parameterized tests, mimicking pytest's `@pytest.mark.parametrize` syntax without requiring a migration away from unittest.","skillfed_tags":["unittest-migration","test-parameterization"],"use_cases":["Gradually migrate a large unittest codebase to pytest-style parameterization without rewriting all test methods at once.","Run the same test logic with multiple input sets in unittest without manually duplicating test methods or using loops.","Combine multiple parameter dimensions (e.g., different inputs and expected outputs) using stacked decorators to test all combinations.","Keep existing unittest infrastructure (setUp, tearDown, self.assert methods) while adopting pytest's cleaner parameterization syntax."],"what_it_does":"Parametrize is a decorator-based test parameterization library that lets you use pytest-style `@parametrize` syntax within `unittest.TestCase` classes. It generates multiple test variants from a single test method, each with different input and expected values, without requiring you to rewrite your existing `setUp`, `tearDown`, or `self.assert*` calls. The decorator works by introspecting the call stack and class scope to dynamically create parameterized test methods at runtime.\n\nThe package is designed as a bridge for teams stuck on unittest who want to adopt pytest's parameterization pattern incrementally. It supports stacking multiple `@parametrize` decorators to create Cartesian products of test cases, and integrates with PyCharm's test runner. However, it has strict limitations: all parameterization must use decorators (not applied after definition), other decorators must come before parametrize decorators, and parametrized tests must be run through pytest rather than the standard unittest CLI.","worth_installing":"Yes, if you have a large unittest codebase and want to adopt pytest-style parameterization without a full rewrite. The package is stable, has no dependencies, and works well for its narrow purpose. However, the dormant maintenance status and strict decorator-ordering rules mean it's best suited for teams committed to pytest as their long-term test runner. If you're starting fresh or can migrate fully to pytest, use pytest's native parametrize instead."},"id":"parametrize","links":{"html":"https://skillfed.io/packages/parametrize","md":"https://skillfed.io/packages/parametrize.md","pypi":"https://pypi.org/project/parametrize/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2021-05-09","license_spdx":null,"license_treatment":"permissive","name":"parametrize","python_support":"supports_current","summary":"Drop-in @pytest.mark.parametrize replacement working with unittest.TestCase"},"popularity":{"monthly_downloads":88835,"position":13700,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.1.1"}
