コード例 #1
0
ファイル: paginate_test.py プロジェクト: benauthor/pagination
 def test_out_of_range_raises(self):
     pages, contents = paginate.wordpaginate('Avast ye landlubbers!', 2, 1000)
コード例 #2
0
ファイル: paginate_test.py プロジェクト: benauthor/pagination
 def test_short_pages_total_one_page(self):
     pages, contents = paginate.wordpaginate('Avast ye landlubbers!', 1, 1000)
     assert pages == 1
コード例 #3
0
ファイル: paginate_test.py プロジェクト: benauthor/pagination
 def test_wordpagination_splits_on_words(self):
     pages, contents = paginate.wordpaginate('Avast ye landlubbers!', 2, 6)
     assert contents == 'landlubbers!'
コード例 #4
0
ファイル: paginate_test.py プロジェクト: benauthor/pagination
 def test_short_pages_pass_right_through(self):
     pages, contents = paginate.wordpaginate('Avast ye landlubbers!', 1, 1000)
     assert contents == 'Avast ye landlubbers!'
コード例 #5
0
ファイル: paginate_test.py プロジェクト: benauthor/pagination
 def test_wordpagination_gets_paginated(self):
     pages, contents = paginate.wordpaginate('Avast ye landlubbers!', 2, 6)
     assert pages > 1