diff --git a/testing/test_mark.py b/testing/test_mark.py index 67219313183..075018f3e32 100644 --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -1344,3 +1344,11 @@ def test_fixture_disallowed_between_marks() -> None: @pytest.mark.usefixtures("tmp_path") def foo(): raise NotImplementedError() + + +def test_marker_rejects_unserializable_argument(): + with pytest.raises(TypeError): + + @pytest.mark.example(object()) + def test_func(): + pass