From 37de8242a90f40e50ed7b2b372e2933e8fd0ddb9 Mon Sep 17 00:00:00 2001 From: Akarsh Singhal <83413214+akarshsinghal@users.noreply.github.com> Date: Fri, 28 Nov 2025 23:36:18 -0500 Subject: [PATCH] Add unit test for should_ignore_error to ensure repeated calls each trigger a DeprecationWarning --- tests/test_should_ignore_error.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_should_ignore_error.py b/tests/test_should_ignore_error.py index f54de624..8348aa39 100644 --- a/tests/test_should_ignore_error.py +++ b/tests/test_should_ignore_error.py @@ -20,3 +20,10 @@ def test_should_ignore_error_returns_false(): with pytest.warns(DeprecationWarning): result = app.should_ignore_error(Exception()) assert result is False + +def test_should_ignore_error_warning_repeated_calls(): + """Verify repeated calls each trigger a DeprecationWarning.""" + app = Flask(__name__) + for _ in range(3): + with pytest.warns(DeprecationWarning): + assert app.should_ignore_error(Exception()) is False \ No newline at end of file