Пример #1
0
 def test_Planter_knownGoodStrings(self):
     p = tokentree.Planter(self.fTestA)
     for s in ["ababbb", "abbbab"]:
         self.assertTrue(s in p.tokenValidator, s)
Пример #2
0
 def test_Planter_knownBadStrings(self):
     p = tokentree.Planter(self.fTestA)
     for s in ["bababa", "aaabbb", "aaaabbb"]:
         self.assertFalse(s in p.tokenValidator, s)
Пример #3
0
 def test_Planter_fTestA_root3_knownBad(self):
     p = tokentree.Planter(self.fTestA, rootRule="3")
     self.assertTrue("ab" in p.tokenValidator, "ab")
     self.assertTrue("ba" in p.tokenValidator, "ba")
Пример #4
0
 def test_Planter_fTestD(self):
     p = tokentree.Planter(self.fTestD)
     self.assertEqual(3, len(p.tokensValid))
Пример #5
0
 def test_Planter_fTestA_root3_knownGood(self):
     p = tokentree.Planter(self.fTestA, rootRule="3")
     self.assertFalse("aa" in p.tokenValidator, "aa")
     self.assertFalse("bb" in p.tokenValidator, "bb")