pytest-dev / pytest-dev/pytest
request direct parameterisation of fixtures by tests
Open
Nobody has claimed this yet.
topic: fixtures
type: proposal
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
This code works which I didn't expect. Request for this to be supported.
python 3.7.3, pytest 7.0.0
import pytest
@pytest.fixture
def c(d, e):
return d + e
@pytest.mark.parametrize(argnames='d, e', argvalues=[(0, 2), (1, 3)])
def test_1(c, d, e):
assert c == d + e
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the provided pytest 7.0.0 example first, then inspect pytest's fixture and parametrization entry points to determine the intended behavior. Done means direct fixture parameterization is explicitly supported and covered by a regression test for both parameter sets; the issue names no files or tests, so the implementation scope needs clarification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100