コード例 #1
0
ファイル: test_wsmatrix.py プロジェクト: samtaufa/wordsearch
 def test_sanitize_sortbysize(self):
     wordlist = ["word", "is", "his", "short"]
     expect = ["short", "word", "his", "is"]
     test = WStext(wordlist, maxlength = 11)
     answer = test.sanitize_sortbysize(wordlist)
     assert answer == expect
     wordlist = ["longing", "notshorter"]
     expect = ["notshorter","longing"]
     test = WStext(wordlist, 11)
     answer = test.sanitize_sortbysize(wordlist)
     assert answer == expect
コード例 #2
0
 def test_sanitize_sortbysize(self):
     wordlist = ["word", "is", "his", "short"]
     expect = ["short", "word", "his", "is"]
     test = WStext(wordlist, maxlength=11)
     answer = test.sanitize_sortbysize(wordlist)
     assert answer == expect
     wordlist = ["longing", "notshorter"]
     expect = ["notshorter", "longing"]
     test = WStext(wordlist, 11)
     answer = test.sanitize_sortbysize(wordlist)
     assert answer == expect