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