--- id: pytest-lazy-fixture version: "0.6.3" license: MIT license_treatment: permissive maintenance: dormant --- # pytest-lazy-fixture — It helps to use fixtures in pytest.mark.parametrize License: permissive · Maintenance: dormant · Downloads: 608.2K/mo ## 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 above — verify before relying. Allows you to use pytest fixtures directly as parameters in @pytest.mark.parametrize decorators and in other fixture parameter lists. 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 pip install pytest-lazy-fixture uv add pytest-lazy-fixture poetry add pytest-lazy-fixture ## Installing pytest-lazy-fixture 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: unspecified - Install friction: low - Maintenance: dormant - Downloads: 608.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest fixtures in parametrize, lazy fixture pytest, parametrize with fixtures, pytest fixture parameters, dynamic test parametrization, pytest-plugin, test-parametrization [View on SkillFed](https://skillfed.io/packages/pytest-lazy-fixture) · [View on PyPI](https://pypi.org/project/pytest-lazy-fixture/)