@@ -137,7 +137,7 @@ class TestHtmlConversion:
137137 def test_unicode_body (self ):
138138 unicode_string = "\u043a \u0438 \u0440 \u0438 \u043b \u043b \u0438 \u0447 \u0435 \u0441 \u043a \u0438 \u0439 \u0442 \u0435 \u043a \u0441 \u0442 "
139139 original_string = unicode_string .encode ("cp1251" )
140- encoding , body_unicode = html_to_unicode (ct ("cp1251" ), original_string )
140+ _ , body_unicode = html_to_unicode (ct ("cp1251" ), original_string )
141141 # check body_as_unicode
142142 assert isinstance (body_unicode , str )
143143 assert body_unicode == unicode_string
@@ -207,15 +207,15 @@ def test_utf8_unexpected_end_of_data_with_valid_utf8_BOM(self):
207207
208208 def test_replace_wrong_encoding (self ):
209209 """Test invalid chars are replaced properly"""
210- encoding , body_unicode = html_to_unicode (ct ("utf-8" ), b"PREFIX\xe3 \xab SUFFIX" )
210+ _ , body_unicode = html_to_unicode (ct ("utf-8" ), b"PREFIX\xe3 \xab SUFFIX" )
211211 # XXX: Policy for replacing invalid chars may suffer minor variations
212212 # but it should always contain the unicode replacement char ('\ufffd')
213213 assert "\ufffd " in body_unicode , repr (body_unicode )
214214 assert "PREFIX" in body_unicode , repr (body_unicode )
215215 assert "SUFFIX" in body_unicode , repr (body_unicode )
216216
217217 # Do not destroy html tags due to encoding bugs
218- encoding , body_unicode = html_to_unicode (ct ("utf-8" ), b"\xf0 <span>value</span>" )
218+ _ , body_unicode = html_to_unicode (ct ("utf-8" ), b"\xf0 <span>value</span>" )
219219 assert "<span>value</span>" in body_unicode , repr (body_unicode )
220220
221221 def _assert_encoding_detected (
0 commit comments