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

Method test_client_encoding

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

Source from the content-addressed store, hash-verified

830 self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
831
832 def test_client_encoding(self):
833 start_string = '\u20ac'
834 end_string = '\xa4'
835
836 try:
837 p = xmlrpclib.ServerProxy(URL, encoding='iso-8859-15')
838 self.assertEqual(p.add(start_string, end_string),
839 start_string + end_string)
840 except (xmlrpclib.ProtocolError, socket.error) as e:
841 # ignore failures due to non-blocking socket unavailable errors.
842 if not is_unavailable_exception(e):
843 # protocol error; provide additional information in test output
844 self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
845
846 def test_nonascii_methodname(self):
847 try:

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