From db82432ec850aed3ee654db131c1cd4879e0cb06 Mon Sep 17 00:00:00 2001 From: Gregory Lee Date: Fri, 8 Nov 2019 01:34:46 -0500 Subject: [PATCH] add minimal test case --- testing/test_mark.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/testing/test_mark.py b/testing/test_mark.py index 2c12c0451..d7ba6e230 100644 --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -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", [