-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
topic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrizetype: backward compatibilitymight present some backward compatibility issues which should be carefully noted in the changelogmight present some backward compatibility issues which should be carefully noted in the changelogtype: bugproblem that needs to be addressedproblem that needs to be addressed
Milestone
Description
Originally reported by: Veeti Paananen (BitBucket: veeti, GitHub: veeti)
import pytest
@pytest.fixture
def request():
return 123
@pytest.mark.parametrize('param', [1, 2, 3])
def test_stuff(request, param):
# test stuff
assert TrueFails with:
def get_direct_param_fixture_func(request):
> return request.param
E AttributeError: 'int' object has no attribute 'param'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
topic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrizetype: backward compatibilitymight present some backward compatibility issues which should be carefully noted in the changelogmight present some backward compatibility issues which should be carefully noted in the changelogtype: bugproblem that needs to be addressedproblem that needs to be addressed