diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-10-28 20:34:11 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-10-28 20:34:11 +0000 |
commit | ef9875b11a33dbd25e92bc6b4cf692c18c9ba0ce (patch) | |
tree | 1f2fd4e4d9e585da35937b42fbda5f854af04728 /contrib/python/MarkupSafe/py3/tests/test_exception_custom_html.py | |
parent | 37ae9cc90160b53eb0e22021c47b3996a01cd656 (diff) | |
parent | e3c8507a3d1cb090278f211232ddfde3bedc54d4 (diff) | |
download | ydb-ef9875b11a33dbd25e92bc6b4cf692c18c9ba0ce.tar.gz |
Merge branch 'rightlib' into mergelibs-241028-2033
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.py | 9 |
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 ec2f10b1d1..582c749136 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) |