コード例 #1
0
ファイル: test_utils.py プロジェクト: MrJohz/votes
    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
ファイル: test_utils.py プロジェクト: MrJohz/votes
 def test_multiple(self):
     s = "this string has already been dewidowed"
     assert utils.dewidow(s) == s
コード例 #3
0
ファイル: test_utils.py プロジェクト: MrJohz/votes
 def test_short_string(self):
     for i in ['short string', 'short', 'short string again']:
         assert utils.dewidow(i) == i
コード例 #4
0
ファイル: test_utils.py プロジェクト: MrJohz/votes
 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"