Exemple #1
0
 def test_unbound_range_contains_float(self):
     value = IntValue(UnboundRange())
     self.assertFalse(value.contains(2.5), 'Contains failed')
Exemple #2
0
 def test_unbound_range_contains_zero(self):
     value = IntValue(UnboundRange())
     self.assertTrue(value.contains(0), 'Contains failed')
Exemple #3
0
 def test_normalize_zero(self):
     range = UnboundRange()
     value = 0
     self.assertEqual(value, range.normalize(value), 'Normalize failed')
Exemple #4
0
 def test_unbound_range_contains_zero_int(self):
     value = FloatValue(UnboundRange())
     self.assertFalse(value.contains(0), 'Contains failed')
Exemple #5
0
 def test_normalize_float(self):
     range = UnboundRange()
     value = 2.5
     self.assertEqual(value, range.normalize(value), 'Normalize failed')
Exemple #6
0
 def test_normalize_false(self):
     range = UnboundRange()
     value = False
     self.assertEqual(value, range.normalize(value), 'Normalize failed')
Exemple #7
0
 def test_contains_zero(self):
     range = UnboundRange()
     self.assertTrue(range.contains(0), 'Contains failed')
Exemple #8
0
 def test_contains_float(self):
     range = UnboundRange()
     self.assertTrue(range.contains(2.5), 'Contains failed')
Exemple #9
0
 def test_contains_false(self):
     range = UnboundRange()
     self.assertTrue(range.contains(False), 'Contains failed')