Skip to content

Commit

Permalink
add minimal test case
Browse files Browse the repository at this point in the history
  • Loading branch information
grlee77 committed Nov 8, 2019
1 parent cc6c5e1 commit db82432
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions testing/test_mark.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,21 @@ def test_func(arg):
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",
[
Expand Down

0 comments on commit db82432

Please sign in to comment.