[Pytest-commit] Issue #745: Missing `param` attribute on request if one param name is substring of other (pytest-dev/pytest)
Markus Unterwaditzer
issues-reply at bitbucket.org
Tue May 19 13:26:17 CEST 2015
New issue 745: Missing `param` attribute on request if one param name is substring of other
https://bitbucket.org/pytest-dev/pytest/issue/745/missing-param-attribute-on-request-if-one
Markus Unterwaditzer:
This is kind-of related to #460, except that it doesn't seem to have anything to do with chained/nested fixtures. Instead, the following testsuite fails because the `item_types` parameter contains `item_type`, which is the name of another fixture!
Renaming `item_types` to something else which doesn't contain `item_type` as substring fixes the issue, as does modifying `item_types` to become a fixture.
```
#!python
import pytest
@pytest.fixture(params=list(range(3)))
def item_type(request):
return request.param
@pytest.mark.parametrize('item_types', list(range(3)))
def test_simple(item_type, item_types):
pass
```
More information about the pytest-commit
mailing list