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
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