From 0b86f57e4b7cf6c2e148a98b6571d8e710a3c156 Mon Sep 17 00:00:00 2001 From: Akarsh Singhal <83413214+akarshsinghal@users.noreply.github.com> Date: Fri, 28 Nov 2025 23:33:42 -0500 Subject: [PATCH] Add parameterized unit test for should_ignore_error covering multiple exception types to verify DeprecationWarning --- tests/test_should_ignore_error.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/test_should_ignore_error.py b/tests/test_should_ignore_error.py index fd06436b..c5287652 100644 --- a/tests/test_should_ignore_error.py +++ b/tests/test_should_ignore_error.py @@ -2,6 +2,14 @@ import pytest from flask import Flask def test_should_ignore_error_deprecation_warning(): + """Minimal test: check DeprecationWarning and return value.""" app = Flask(__name__) with pytest.warns(DeprecationWarning): - assert app.should_ignore_error(None) is False \ No newline at end of file + assert app.should_ignore_error(None) is False + +@pytest.mark.parametrize("error", [Exception(), ValueError(), RuntimeError()]) +def test_should_ignore_error_multiple_exceptions(error): + """Verify that should_ignore_error issues a DeprecationWarning for multiple exception types.""" + app = Flask(__name__) + with pytest.warns(DeprecationWarning): + assert app.should_ignore_error(error) is False