Beispiel #1
0
 def test_out_of_range_raises(self):
     pages, contents = paginate.wordpaginate('Avast ye landlubbers!', 2, 1000)
Beispiel #2
0
 def test_short_pages_total_one_page(self):
     pages, contents = paginate.wordpaginate('Avast ye landlubbers!', 1, 1000)
     assert pages == 1
Beispiel #3
0
 def test_wordpagination_splits_on_words(self):
     pages, contents = paginate.wordpaginate('Avast ye landlubbers!', 2, 6)
     assert contents == 'landlubbers!'
Beispiel #4
0
 def test_short_pages_pass_right_through(self):
     pages, contents = paginate.wordpaginate('Avast ye landlubbers!', 1, 1000)
     assert contents == 'Avast ye landlubbers!'
Beispiel #5
0
 def test_wordpagination_gets_paginated(self):
     pages, contents = paginate.wordpaginate('Avast ye landlubbers!', 2, 6)
     assert pages > 1