コード例 #1
0
ファイル: unittests.py プロジェクト: tfeldmann/Vokabelcheck
 def test_duplicates(self):
     x = model.words_with_endings(["a", "b", "b"], ["1", "2"])
     self.failUnlessEqual(x, {"a1", "a2", "b1", "b2"})
コード例 #2
0
ファイル: unittests.py プロジェクト: tfeldmann/Vokabelcheck
 def test_empty_endings(self):
     x = model.words_with_endings({"a", "b", "c"}, set())
     self.failUnlessEqual(x, {"a", "b", "c"})
コード例 #3
0
ファイル: unittests.py プロジェクト: tfeldmann/Vokabelcheck
 def test_empty_both(self):
     x = model.words_with_endings(set(), set())
     self.failUnlessEqual(x, set())
コード例 #4
0
ファイル: unittests.py プロジェクト: tfeldmann/Vokabelcheck
 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'})