Example #1
0
 def test_can_get_error_value_safely(self):
     val = Value.create(10.5, 0.2)
     self.assertIsInstance(val, Value)
     self.assertEqual(val._value, 10.5)
     self.assertEqual(val._error, 0.2)
Example #2
0
 def test_can_ignore_non_numbers(self):
     s = "value"
     val = Value.create(s, 0.2)
     self.assertIs(val, s)
Example #3
0
 def test_can_get_simple_value_safely(self):
     val = Value.create(10)
     self.assertIsInstance(val, Value)
     self.assertEqual(val._value, 10)
     self.assertEqual(val._error, 0)