Example #1
0
 def test_upper_bound_5(self):
     contact = Contact(1, 2, 1.0)
     contact.lower_bound = 4
     contact.upper_bound = 8
     self.assertEqual(4, contact.lower_bound)
     with self.assertRaises(ValueError):
         contact.upper_bound = 4
     with self.assertRaises(ValueError):
         contact.upper_bound = 3
     self.assertEqual(8, contact.upper_bound)
Example #2
0
 def test_upper_bound_3(self):
     contact = Contact(1, 2, 1.0)
     contact.upper_bound = 10
     self.assertEqual(10, contact.upper_bound)
Example #3
0
 def test_upper_bound_4(self):
     contact = Contact(1, 2, 1.0)
     contact.upper_bound = 7
     self.assertEqual(7, contact.upper_bound)
Example #4
0
 def test_upper_bound_2(self):
     contact = Contact(1, 2, 1.0)
     with self.assertRaises(ValueError):
         contact.upper_bound = -1