Exemplo n.º 1
0
 def testWeightingPicksTwoHighestWeightedError(self):
     inputData = [
         self.__HIT1, self.__2ERR2, self.__2ERR1, self.__1ERR, self.__NOHIT1
     ]
     parser = TXTErrorParser(inputData)
     result = parser.locateKeyErrors()
     self.assertEqual(sorted([self.__2ERR1, self.__2ERR2]), sorted(result))
Exemplo n.º 2
0
 def testWeightingReturnsAnEmptyArrayWithAnEmptyLogFile(self):
     parser = TXTErrorParser([])
     self.assertEqual([], parser.locateKeyErrors())
Exemplo n.º 3
0
 def testWeightingReturnsEmptyList(self):
     inputData = [self.__NOHIT1, self.__NOHIT2]
     parser = TXTErrorParser(inputData)
     self.assertEqual([], parser.locateKeyErrors())
Exemplo n.º 4
0
 def testWeightingPicksSingleHighestWeightedError(self):
     inputData = [self.__3ERR, self.__2ERR1, self.__1ERR]
     parser = TXTErrorParser(inputData)
     result = parser.locateKeyErrors()
     self.assertEqual([self.__3ERR], result)
Exemplo n.º 5
0
 def testWeightingReturnsAnEmptyArrayWithAnEmptyLogFile(self):
     parser = TXTErrorParser([])
     self.assertEqual([], parser.locateKeyErrors())
Exemplo n.º 6
0
 def testWeightingReturnsEmptyList(self):
     inputData = [self.__NOHIT1, self.__NOHIT2]
     parser = TXTErrorParser(inputData)
     self.assertEqual([], parser.locateKeyErrors())
Exemplo n.º 7
0
 def testWeightingPicksTwoHighestWeightedError(self):
     inputData = [self.__HIT1, self.__2ERR2, self.__2ERR1,
                  self.__1ERR, self.__NOHIT1]
     parser = TXTErrorParser(inputData)
     result = parser.locateKeyErrors()
     self.assertEqual(sorted([self.__2ERR1, self.__2ERR2]), sorted(result))
Exemplo n.º 8
0
 def testWeightingPicksSingleHighestWeightedError(self):
     inputData = [self.__3ERR, self.__2ERR1, self.__1ERR]
     parser = TXTErrorParser(inputData)
     result = parser.locateKeyErrors()
     self.assertEqual([self.__3ERR], result)