MCPcopy Index your code
hub / github.com/python/cpython / test_nonascii

Method test_nonascii

Lib/test/test_xmlrpc.py:819–830  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

817 self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
818
819 def test_nonascii(self):
820 start_string = 'P\N{LATIN SMALL LETTER Y WITH CIRCUMFLEX}t'
821 end_string = 'h\N{LATIN SMALL LETTER O WITH HORN}n'
822 try:
823 p = xmlrpclib.ServerProxy(URL)
824 self.assertEqual(p.add(start_string, end_string),
825 start_string + end_string)
826 except (xmlrpclib.ProtocolError, OSError) as e:
827 # ignore failures due to non-blocking socket 'unavailable' errors
828 if not is_unavailable_exception(e):
829 # protocol error; provide additional information in test output
830 self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
831
832 def test_client_encoding(self):
833 start_string = '\u20ac'

Callers

nothing calls this directly

Calls 4

is_unavailable_exceptionFunction · 0.85
assertEqualMethod · 0.45
addMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected