Пример #1
0
    def testRemoveDuplicates(self):
        names = filterName.getNames(self.testString)
        D = filterName.deleteDuplicates(names)
        namecount = True

        for name in self.exampleNames:
            if D[name] != 3:
                namecount = False

        self.assertEqual(namecount, True)
    def testRemoveDuplicates(self):
        names = filterName.getNames(self.testString)
        D = filterName.deleteDuplicates(names)
        namecount = True

        for name in self.exampleNames:
            if D[name] != 3:
                namecount = False

        self.assertEqual(namecount, True)
Пример #3
0
 def testNameSearchHyphen(self):
     names = filterName.getNames(self.testString3)
     self.assertIn("Brian O-Malley", names)
Пример #4
0
 def testNameSearchApostrophe(self):
     names = filterName.getNames(self.testString2)
     self.assertIn("Brian O'Malley", names)
Пример #5
0
 def testNameSearchSimple(self):
     names = filterName.getNames(self.testString)
     self.assertIn("Eric Chen", names)
Пример #6
0
 def testNameSearchSimpleSurnames(self):
     """should not match to a name such as Mr. Smith"""
     names = filterName.getNames(self.testStringSurnames)
     self.assertNotIn("Smith", names)
 def testNameSearchHyphen(self):
     names = filterName.getNames(self.testString3)
     self.assertIn("Brian O-Malley", names)
 def testNameSearchApostrophe(self):
     names = filterName.getNames(self.testString2)
     self.assertIn("Brian O'Malley", names)
 def testNameSearchSimple(self):
     names = filterName.getNames(self.testString)
     self.assertIn("Eric Chen", names)
 def testNameSearchSimpleSurnames(self):
     """should not match to a name such as Mr. Smith"""
     names = filterName.getNames(self.testStringSurnames)
     self.assertNotIn("Smith", names)