示例#1
0
    def test_forced(self):
        s = "this string has many words in it"
        assert utils.dewidow(s, force=True) == "this string has many words in it"

        s = "short string"
        assert utils.dewidow(s, force=True) == "short string"

        s = "oneword"
        assert utils.dewidow(s, force=True) == "oneword"

        s = "short string again"
        assert utils.dewidow(s, force=True) == "short string again"
示例#2
0
 def test_multiple(self):
     s = "this string has already been dewidowed"
     assert utils.dewidow(s) == s
示例#3
0
 def test_short_string(self):
     for i in ['short string', 'short', 'short string again']:
         assert utils.dewidow(i) == i
示例#4
0
 def test_long_string(self):
     s = "this string has more than three words in it"
     assert utils.dewidow(s) == "this string has more than three words in it"