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