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"
def test_multiple(self): s = "this string has already been dewidowed" assert utils.dewidow(s) == s
def test_short_string(self): for i in ['short string', 'short', 'short string again']: assert utils.dewidow(i) == i
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"