Beispiel #1
0
 def test_parse_special_float(self):
     self.assertEqual(native.yaml_load('.inf'), Decimal('Infinity'))
     self.assertEqual(native.yaml_load('-.inf'), -Decimal('Infinity'))
     self.assertTrue(math.isnan(native.yaml_load('.nan')))
 def test_parse_special_float(self):
     self.assertEqual(native.yaml_load('.inf'), Decimal('Infinity'))
     self.assertEqual(native.yaml_load('-.inf'), -Decimal('Infinity'))
     self.assertTrue(math.isnan(native.yaml_load('.nan')))
Beispiel #3
0
 def test_parse_normal_float(self):
     v = native.yaml_load('-23.456')
     self.assertEqual(v, Decimal('-23.456'))
     self.assertIsInstance(v, Decimal)
 def test_parse_normal_float(self):
     v = native.yaml_load('-23.456')
     self.assertEqual(v, Decimal('-23.456'))
     self.assertIsInstance(v, Decimal)