(self)
| 923 | self.fail("%s\n%s" % (e, getattr(e, "headers", ""))) |
| 924 | |
| 925 | def test_multicall(self): |
| 926 | try: |
| 927 | p = xmlrpclib.ServerProxy(URL) |
| 928 | multicall = xmlrpclib.MultiCall(p) |
| 929 | multicall.add(2,3) |
| 930 | multicall.pow(6,8) |
| 931 | multicall.div(127,42) |
| 932 | add_result, pow_result, div_result = multicall() |
| 933 | self.assertEqual(add_result, 2+3) |
| 934 | self.assertEqual(pow_result, 6**8) |
| 935 | self.assertEqual(div_result, 127//42) |
| 936 | except (xmlrpclib.ProtocolError, OSError) as e: |
| 937 | # ignore failures due to non-blocking socket 'unavailable' errors |
| 938 | if not is_unavailable_exception(e): |
| 939 | # protocol error; provide additional information in test output |
| 940 | self.fail("%s\n%s" % (e, getattr(e, "headers", ""))) |
| 941 | |
| 942 | def test_non_existing_multicall(self): |
| 943 | try: |
nothing calls this directly
no test coverage detected