Example #1
0
 def test_duplicates(self):
     word = "abc"
     x = model.word_with_endings(word, {"x", "x", "y"})
     self.failUnlessEqual(x, {"abcx", "abcy"})
Example #2
0
 def test_empty_both(self):
     x = model.word_with_endings(set(), set())
     self.failUnlessEqual(x, set())
Example #3
0
 def test_empty_wordlist(self):
     x = model.word_with_endings(set(), {"a", "b"})
     self.failUnlessEqual(x, set())
Example #4
0
 def test_empty_endings(self):
     x = model.word_with_endings("x", set())
     self.failUnlessEqual(x, {"x"})
Example #5
0
 def test_connecting(self):
     x = model.word_with_endings("abc", {'', 'b', 'aBc'})
     self.failUnlessEqual(x, {'abc', 'abcb', 'abcaBc'})