added a test for when the indirect is just a string
This commit is contained in:
@@ -417,6 +417,23 @@ class TestMetafunc:
|
||||
"*uses no fixture 'y'*",
|
||||
])
|
||||
|
||||
@pytest.mark.issue714
|
||||
def test_parametrize_indirect_uses_no_fixture_error_indirect_string(self, testdir):
|
||||
testdir.makepyfile("""
|
||||
import pytest
|
||||
@pytest.fixture(scope='function')
|
||||
def x(request):
|
||||
return request.param * 3
|
||||
|
||||
@pytest.mark.parametrize('x, y', [('a', 'b')], indirect='y')
|
||||
def test_simple(x):
|
||||
assert len(x) == 3
|
||||
""")
|
||||
result = testdir.runpytest("--collect-only")
|
||||
result.stdout.fnmatch_lines([
|
||||
"*uses no fixture 'y'*",
|
||||
])
|
||||
|
||||
@pytest.mark.issue714
|
||||
def test_parametrize_indirect_uses_no_fixture_error_indirect_list(self, testdir):
|
||||
testdir.makepyfile("""
|
||||
|
||||
Reference in New Issue
Block a user