def test_Planter_knownGoodStrings(self): p = tokentree.Planter(self.fTestA) for s in ["ababbb", "abbbab"]: self.assertTrue(s in p.tokenValidator, s)
def test_Planter_knownBadStrings(self): p = tokentree.Planter(self.fTestA) for s in ["bababa", "aaabbb", "aaaabbb"]: self.assertFalse(s in p.tokenValidator, s)
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")
def test_Planter_fTestD(self): p = tokentree.Planter(self.fTestD) self.assertEqual(3, len(p.tokensValid))
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")