From a1811064fe9c686b379c39795b85763fa632b7ba Mon Sep 17 00:00:00 2001 From: Nathan McDougall Date: Sat, 20 Dec 2025 09:41:32 +1300 Subject: [PATCH] Add `match` arg in `pytest.warns` for `DeprecationWarning` of `NamespacePackageEncountered` --- tests/unit/test_exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_exceptions.py b/tests/unit/test_exceptions.py index 4a2c7186..2ffd8fa5 100644 --- a/tests/unit/test_exceptions.py +++ b/tests/unit/test_exceptions.py @@ -60,5 +60,5 @@ def test_different_texts_are_not_equal(self): class TestNamespacePackageEncountered: def test_deprecated_access(self): - with pytest.warns(DeprecationWarning): + with pytest.warns(DeprecationWarning, match="NamespacePackageEncountered is deprecated"): exceptions.NamespacePackageEncountered