Add a test for the windows lxml workaround

This commit is contained in:
Kovid Goyal 2025-09-26 16:54:29 +05:30
parent b013d2fb5c
commit 8bb1f251b5
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -165,6 +165,9 @@ class BuildTest(unittest.TestCase):
self.assertEqual(etree.tostring(root), raw)
from lxml import html
html.fromstring('<p>\U0001f63a')
from calibre.utils.xml_parse import safe_xml_fromstring
bad = '\U0001f468' * 8192
safe_xml_fromstring(f'<p x="\U0001f600">\U0001f63a&#x1f63a;{bad}</p>')
def test_certgen(self):
from calibre.utils.certgen import create_key_pair