pytest-lazy-fixture
It helps to use fixtures in pytest.mark.parametrize
Decision gist · record as of 2026-08-14
Yes, if your pytest version is stable and pre-2023. The package solves a real pytest limitation with low friction and no security issues. However, dormant maintenance means it may break with newer pytest releases—verify compatibility with your pytest version before adopting, and consider whether pytest's native parametrization patterns can meet your needs first.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a single pytest dependency.
- Maintenance is dormant—last release was 2020-02-01 and no commits since 2023-10-02—so expect no active bug fixes or compatibility updates for newer pytest versions.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it safe for commercial and open-source projects.
last release 2020-02-01 (2386 days) · last repo commit 2023-10-02 · 396 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 608,183 downloads/mo, #5,781 on PyPI
Alternatives
Verify before relying
pip install pytest-lazy-fixture
import pytest
@pytest.fixture(params=[1, 2])
def one(request):
return request.param
@pytest.mark.parametrize('arg1,arg2', [
('val1', pytest.lazy_fixture('one')),
])
def test_func(arg1, arg2):
assert arg2 in [1, 2]- Compatibility with pytest versions released after 2023-10-02 is unclear given dormant maintenance status.
- Whether this package is superseded by built-in pytest functionality or a maintained alternative.
What it is and what it does
pytest-lazy-fixture extends pytest's parametrize decorator to accept fixture references, bridging a gap between pytest's fixture system and its parametrization system. Normally, @pytest.mark.parametrize only accepts literal values; this package lets you pass pytest.lazy_fixture('fixture_name') to inject fixture values into parametrized tests at runtime. It also works in fixture parameter lists, allowing one fixture to depend on another fixture's parametrized values.
The package is a thin wrapper around pytest's internals and has no dependencies beyond pytest itself. It is dormant—last updated in early 2020—so it may not work reliably with recent pytest versions without maintenance.
Use it for
- Parametrize a test with values from a fixture that itself has multiple parameter variants.
- Avoid duplicating test logic by reusing fixture definitions across multiple parametrized test cases.
- Chain fixtures together where one fixture's parameters depend on another fixture's output.
- Test the same function against multiple fixture-generated inputs without writing separate test functions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if your pytest version is stable and pre-2023.
The package solves a real pytest limitation with low friction and no security issues. However, dormant maintenance means it may break with newer pytest releases—verify compatibility with your pytest version before adopting, and consider whether pytest's native parametrization patterns can meet your needs first.
Install
pytest-lazy-fixture on PyPI
Before you install
Low install friction with a single pytest dependency. Maintenance is dormant—last release was 2020-02-01 and no commits since 2023-10-02—so expect no active bug fixes or compatibility updates for newer pytest versions.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it safe for commercial and open-source projects.
Quickstart
pip install pytest-lazy-fixture
import pytest
@pytest.fixture(params=[1, 2])
def one(request):
return request.param
@pytest.mark.parametrize('arg1,arg2', [
('val1', pytest.lazy_fixture('one')),
])
def test_func(arg1, arg2):
assert arg2 in [1, 2]
Verify before relying
- Compatibility with pytest versions released after 2023-10-02 is unclear given dormant maintenance status.
- Whether this package is superseded by built-in pytest functionality or a maintained alternative.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepytest |
| Maintenance | Dormant 2,386 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 608,183 / month, #5,781 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Testing |
Evidence: pytest_lazy_fixture-0.6.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pytest fixture parameters”
- pytest-lazy-fixtureAllows you to use pytest fixtures directly as parameters in…
- pytest-httpxpytest-httpx provides a pytest fixture that intercepts httpx requests…
- pylint-pytestA Pylint plugin that suppresses false-positive warnings when…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also pytest-fixture-config · pytest-lazy-fixtures · pytest-parametrization · pytest-raises · pytest-cases · pytest-print · parametrize · pytest-factoryboy · pytest-unused-fixtures