From 0aae3e2545988c367a8178c7f6c8b9ae4b2c0f1f Mon Sep 17 00:00:00 2001 From: Stephan Lachnit Date: Wed, 5 Jul 2023 01:48:34 +0200 Subject: [PATCH] test_cost: use pytest.warns instead of raises for VisibleDeprecationWarning --- tests/test_cost.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cost.py b/tests/test_cost.py index 99c287d5..396604fb 100644 --- a/tests/test_cost.py +++ b/tests/test_cost.py @@ -237,7 +237,7 @@ def test_UnbinnedNLL_visualize(log): # manual spacing c.visualize((1, 2), model_points=np.linspace(1, 1000)) - with pytest.raises( + with pytest.warns( np.VisibleDeprecationWarning, match="keyword 'nbins' is deprecated" ): c.visualize((1, 2), nbins=20)