pytest can't find pytest.fixture_request

Viewed 2372

I am attempting to utilize the alternative approach listed in the PyTest documentation here. My parametrize decorator call looks like this

@pytest.mark.parametrize("val1, params, result", [
    ('a string', pytest.fixture_request('valid_type'), 150)

])

However, when I run pytest I get the following error:

test_get_responses.py:102: in <module>
    ('a string', pytest.fixture_request('valid_type'), 150)
E   AttributeError: 'module' object has no attribute 'fixture_request'

The valid_type fixture does exist.

I am running pytest version 3.2.0

How can I solve this problem, so that I can utilize the 'alternative approach' listed in the documentation above?

1 Answers
Related