Exemple #1
0
 def testEdgeCaseNotFound2(self):
     # testing edge case with no answer
     result = searchContinuityAboveValueTwoSignals(data1, data2, 0, 4, 7,
                                                   -2, 5)
     self.assertEqual(result, errd.ERROR_NOT_FOUND)
Exemple #2
0
 def testEdgeCaseOutOfBounds(self):
     # testing failure edge case
     result8 = searchContinuityAboveValueTwoSignals(data1, data2, 5, 99, 99,
                                                    99, 10)
     self.assertEqual(result8, errd.ERROR_OUT_OF_BOUNDS)
Exemple #3
0
 def testEdgeCaseAnswer(self):
     # testing edge case with an answer
     result = searchContinuityAboveValueTwoSignals(data1, data2, 0, 4, -1,
                                                   -2, 5)
     self.assertEqual(result, 0)
Exemple #4
0
 def testNotFindingAnswerUsual1(self):
     # testing case of not finding answer
     result = searchContinuityAboveValueTwoSignals(data1, data2, 10, 50, 5,
                                                   60, 5)
     self.assertEqual(result, errd.ERROR_NOT_FOUND)
Exemple #5
0
 def testNoData2(self):
     # testing another failure case
     result = searchContinuityAboveValueTwoSignals(data1, None, 10, 50, 40,
                                                   11, 5)
     self.assertEqual(result, errd.ERROR_NO_DATA)
Exemple #6
0
 def testTooSmall(self):
     # testing a failure case
     result = searchContinuityAboveValueTwoSignals(data1, data2, 2, 5, -2,
                                                   -2, 10)
     self.assertEqual(result, errd.ERROR_TOO_SMALL)
Exemple #7
0
 def testBasicOp1(self):
     # testing basic operation
     result = searchContinuityAboveValueTwoSignals(data1, data2, 10, 50, 40,
                                                   11, 5)
     self.assertEqual(result, 40)