Esempio n. 1
0
 def test_decode_floating_point_data_type(self):
     value = b'@I\x0f\xd0'
     self.assertIsInstance(decode.floating_point(value)[1], float)
Esempio n. 2
0
 def test_decode_floating_point_value(self):
     value = b'@I\x0f\xd0'
     self.assertEqual(round(decode.floating_point(value)[1], 5),
                      round(float(3.14159), 5))
Esempio n. 3
0
 def test_decode_floating_point_bytes_consumed(self):
     value = b'@I\x0f\xd0'
     self.assertEqual(decode.floating_point(value)[0], 4)