add minimal test case

This commit is contained in:
Gregory Lee 2019-11-08 01:34:46 -05:00
parent cc6c5e15b8
commit db82432ec8
1 changed files with 15 additions and 0 deletions

View File

@ -314,6 +314,21 @@ def test_keyword_option_parametrize(spec, testdir):
assert list(passed) == list(passed_result)
def test_parametrize_with_module(testdir):
testdir.makepyfile(
"""
import pytest
@pytest.mark.parametrize("arg", [pytest,])
def test_func(arg):
pass
"""
)
rec = testdir.inline_run()
passed, skipped, fail = rec.listoutcomes()
expected_id = "test_func[" + pytest.__name__ + "]"
assert passed[0].nodeid.split("::")[-1] == expected_id
@pytest.mark.parametrize(
"spec",
[