diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/python/MarkupSafe/py2/tests/test_exception_custom_html.py | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/MarkupSafe/py2/tests/test_exception_custom_html.py')
-rw-r--r-- | contrib/python/MarkupSafe/py2/tests/test_exception_custom_html.py | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/contrib/python/MarkupSafe/py2/tests/test_exception_custom_html.py b/contrib/python/MarkupSafe/py2/tests/test_exception_custom_html.py index 5f9ffde438d..93bf2f29cce 100644 --- a/contrib/python/MarkupSafe/py2/tests/test_exception_custom_html.py +++ b/contrib/python/MarkupSafe/py2/tests/test_exception_custom_html.py @@ -1,21 +1,21 @@ -# -*- coding: utf-8 -*- -import pytest - -from markupsafe import escape - - -class CustomHtmlThatRaises(object): - def __html__(self): - raise ValueError(123) - - -def test_exception_custom_html(): - """Checks whether exceptions in custom __html__ implementations are - propagated correctly. - - There was a bug in the native implementation at some point: - https://github.com/pallets/markupsafe/issues/108 - """ - obj = CustomHtmlThatRaises() - with pytest.raises(ValueError): - escape(obj) +# -*- coding: utf-8 -*- +import pytest + +from markupsafe import escape + + +class CustomHtmlThatRaises(object): + def __html__(self): + raise ValueError(123) + + +def test_exception_custom_html(): + """Checks whether exceptions in custom __html__ implementations are + propagated correctly. + + There was a bug in the native implementation at some point: + https://github.com/pallets/markupsafe/issues/108 + """ + obj = CustomHtmlThatRaises() + with pytest.raises(ValueError): + escape(obj) |