Add unit test for should_ignore_error to ensure repeated calls each trigger a DeprecationWarning
This commit is contained in:
parent
c12a967097
commit
37de8242a9
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue