aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/MarkupSafe/py3/tests/test_exception_custom_html.py
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2024-10-22 10:34:11 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2024-10-22 10:46:51 +0300
commit46fcf833e07a09937c4706e97ef898da21e2d48a (patch)
tree142bf42051026bd1e23bbfa7ffb38306eb058265 /contrib/python/MarkupSafe/py3/tests/test_exception_custom_html.py
parentf31afaca1d29160f76a2e6480e1ebf634cb95b98 (diff)
downloadydb-46fcf833e07a09937c4706e97ef898da21e2d48a.tar.gz
Update contrib/python/MarkupSafe/py3 to 3.0.0
commit_hash:541556d8b37adaf0555d01e3ec72cc263f013e0a
Diffstat (limited to 'contrib/python/MarkupSafe/py3/tests/test_exception_custom_html.py')
-rw-r--r--contrib/python/MarkupSafe/py3/tests/test_exception_custom_html.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/python/MarkupSafe/py3/tests/test_exception_custom_html.py b/contrib/python/MarkupSafe/py3/tests/test_exception_custom_html.py
index ec2f10b1d19..582c7491367 100644
--- a/contrib/python/MarkupSafe/py3/tests/test_exception_custom_html.py
+++ b/contrib/python/MarkupSafe/py3/tests/test_exception_custom_html.py
@@ -1,12 +1,16 @@
+from __future__ import annotations
+
import pytest
+from markupsafe import escape
+
class CustomHtmlThatRaises:
- def __html__(self):
+ def __html__(self) -> str:
raise ValueError(123)
-def test_exception_custom_html(escape):
+def test_exception_custom_html() -> None:
"""Checks whether exceptions in custom __html__ implementations are
propagated correctly.
@@ -14,5 +18,6 @@ def test_exception_custom_html(escape):
https://github.com/pallets/markupsafe/issues/108
"""
obj = CustomHtmlThatRaises()
+
with pytest.raises(ValueError):
escape(obj)