def test_decoding_method(self): """ Checks that we can decode a method. """ data = service_call.encode_call("foo", [42]) name, params = service_call.decode_call(data) self.assertEqual(name, "foo") self.assertEqual(params, [42])
def test_float_single_precision(self): """ Checks that floats are single precision. """ data = service_call.encode_call("foo", 1. + 1e-8) name, args = service_call.decode_call(data) # Check that we have the marker for single precision float self.assertEqual(1., args)