Exemple #1
0
 def test_borderline(self):
     limits = [-1.2324230, 1.7484]
     self.assertEqual(0, qc.hard_limit(limits[0], limits))
     self.assertEqual(0, qc.hard_limit(limits[1], limits))
Exemple #2
0
 def test_a_failure(self):
     limits = [-1.2324230, 1.7484]
     self.assertEqual(1, qc.hard_limit(limits[0] - 23.2, limits))
     self.assertEqual(1, qc.hard_limit(limits[1] + 9.5, limits))
Exemple #3
0
 def test_safe(self):
     self.assertEqual(0, qc.hard_limit(0.0, [-1.0, 1.0]))