def testOneValue(self):
     ''' преобразование 1 и 2
     ошибка 1 = 0.5
     '''
     doubleOne = 1.0
     # проверка преобразования
     m, a, doubleOneDirectCnvMCHIP = f32cnv.pack_f32_into_i32(doubleOne, plot_call_back)
     self.assertEqual(f32cnv.hex_mchip_f32_to_hex_ieee_f32(doubleOneDirectCnvMCHIP), doubleOne)
 def testHalfValue(self):
     ''' '''
     doubleOne = 0.5
     # проверка преобразования
     message, a, doubleOneDirectCnvMCHIP = f32cnv.pack_f32_into_i32(doubleOne, plot_call_back)
     self.assertEqual(f32cnv.hex_mchip_f32_to_hex_ieee_f32(doubleOneDirectCnvMCHIP), doubleOne)
 def testIEEEHalfValue(self):
     doubleOne = 0.5
     # проверка преобразования
     m, a, doubleOneDirectCnvMCHIP = f32cnv.pack_f32_into_i32(doubleOne, plot_call_back)
     self.assertEqual(f32cnv.hex_ieee_f32_str_to_float(a), doubleOne)
 def testZero(self):
     doubleOne = 0.0
     # проверка преобразования
     m, a, doubleOneDirectCnvMCHIP = f32cnv.pack_f32_into_i32(doubleOne, None)
     self.assertEqual(a[:-1], '00 00 00 00')