skillfed

parameterized

Parameterized testing with any Python test framework

parameterized v0.9.0 21.1M downloads/30d#1,010 on PyPI856
Permissive license FreeBSD DORMANT released

What it is and what it does

Parameterized is a decorator library that lets you write a single test function and run it against multiple sets of inputs, eliminating repetitive test code. It works across nose, pytest, unittest, and other test runners, generating separate test cases for each parameter set so they appear as distinct tests in your test output.

The package provides two main decorators: @parameterized for standalone test functions and @parameterized.expand for test methods within classes. You pass a list of tuples, param objects, or a callable that returns test cases, and the decorator automatically generates individual test cases. It has no runtime dependencies and installs with minimal friction, making it a lightweight addition to any test suite.

Use it for:

  • Test the same logic across multiple input values (e.g., testing a math function with different numbers) without writing duplicate test methods.
  • Generate test cases from external data sources like JSON files or CSV data by passing a callable that loads and returns test parameters.
  • Test class behavior with different initial states by using @parameterized_class to instantiate a test class multiple times with different attributes.
  • Improve test readability and maintainability by centralizing test data in one place rather than scattering it across multiple test methods.
  • Integrate parameterized tests into existing unittest, pytest, or nose test suites without changing the test runner or project structure.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parameterized testing decorator that works with nose, pytest, unittest, and other Python test frameworks to run the same test function across multiple input sets.

Yes, if you use unittest, nose, or pytest 3 and want to reduce test boilerplate. The package is stable and has no dependencies. However, maintenance is dormant with the last release on 2023-03-27, so compatibility with future Python versions is uncertain. Check the compatibility table for your specific test framework and Python version before relying on it for new projects.

Install

parameterized on PyPI

pip

pip install parameterized

uv

uv add parameterized

poetry

poetry add parameterized

Installing parameterized

Before you install

Low friction installation with no runtime dependencies. Maintenance is dormant—last release was 2023-03-27 over a year ago—but the package is stable and widely used in the top 5000 PyPI packages. No active development signal, so expect no new features or rapid bug fixes.

License in practice

FreeBSD license is permissive, allowing commercial and private use with minimal restrictions. No notable licensing constraints for most projects.

Quickstart

pip install parameterized

from parameterized import parameterized
import unittest

class TestExample(unittest.TestCase):
    @parameterized.expand([
        ("case1", 2, 4),
        ("case2", 3, 9),
    ])
    def test_square(self, name, input_val, expected):
        self.assertEqual(input_val ** 2, expected)

Requires Python 3.7 or later. Some test frameworks have known compatibility gaps (e.g., pytest 4, pytest fixtures, nose with Python 3.10 or 3.11)—check the compatibility table in the documentation.

Verify before relying

  • Whether dormant maintenance will affect compatibility with Python versions beyond 3.11
  • Current state of known compatibility issues with pytest 4 and pytest fixtures (issue #34, #81)
  • Whether the package will receive updates for future Python releases

Package facts

License FreeBSD (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 1,236 days since the last release
Last repo commit
First released
Downloads 21,140,902/month — #1,010 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: parameterized-0.9.0-py2.py3-none-any.whl

License :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3

Tags

parameterized testing decoratortest multiple inputs same functionpytest parameterize alternativeunittest test data drivennose parameterized testsdata-driven testing pythontest case generation
test-utilitiesdata-driven-testing

More Testing packages