示例#1
0
    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])
示例#2
0
    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])
示例#3
0
    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)
示例#4
0
    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)