MCPcopy
hub / github.com/httpie/cli / test_charset_text_pairs

Function test_charset_text_pairs

tests/test_encoding.py:23–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21
22
23def test_charset_text_pairs():
24 # Verify our test data is legit.
25 for charset, text in CHARSET_TEXT_PAIRS:
26 assert len(text) > TOO_SMALL_SEQUENCE
27 if charset != UTF8:
28 with pytest.raises(UnicodeDecodeError):
29 assert text != text.encode(charset).decode(UTF8)
30
31
32def test_unicode_headers(httpbin):

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.80

Tested by

no test coverage detected