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