Exemple #1
0
 def test_duplicates(self):
     x = model.words_with_endings(["a", "b", "b"], ["1", "2"])
     self.failUnlessEqual(x, {"a1", "a2", "b1", "b2"})
Exemple #2
0
 def test_empty_endings(self):
     x = model.words_with_endings({"a", "b", "c"}, set())
     self.failUnlessEqual(x, {"a", "b", "c"})
Exemple #3
0
 def test_empty_both(self):
     x = model.words_with_endings(set(), set())
     self.failUnlessEqual(x, set())
Exemple #4
0
 def test_basic(self):
     words = ['a', 'b', 'ABC']
     x = model.words_with_endings(words, {'', 'x', 'XX'})
     self.failUnlessEqual(x, {'a', 'ax', 'aXX', 'b', 'bx', 'bXX',
                              'ABC', 'ABCx', 'ABCXX'})