From ddb308455ae615d23bf3a494f84a5059c9ceb979 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 5 Sep 2018 09:01:29 -0300 Subject: [PATCH] Make sure warn is called in test_parameterset_extractfrom --- testing/test_mark.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/testing/test_mark.py b/testing/test_mark.py index f50902eb1..9dad7a165 100644 --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -1039,14 +1039,19 @@ class TestKeywordSelection(object): ), ], ) -@pytest.mark.filterwarnings("ignore") +@pytest.mark.filterwarnings("default") def test_parameterset_extractfrom(argval, expected): + from _pytest.deprecated import MARK_PARAMETERSET_UNPACKING + + warn_called = [] + class DummyItem: def warn(self, warning): - pass + warn_called.append(warning) extracted = ParameterSet.extract_from(argval, belonging_definition=DummyItem()) assert extracted == expected + assert warn_called == [MARK_PARAMETERSET_UNPACKING] def test_legacy_transfer():