aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Kyle Stanley <[email protected]>2020-06-26 02:08:48 -0400
committerGravatar Kyle Stanley <[email protected]>2020-06-26 03:34:38 -0400
commit195e0f9407d2a8b7ac5b3028b4f10c1b73af0a4f (patch)
tree9dc2e5f1c072b3e4cf7ad2db7c516d7907894e51 /tests
parentSimplify LinePaginator continuation header (diff)
Update LinePaginator.add_line() tests
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/test_pagination.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/bot/test_pagination.py b/tests/bot/test_pagination.py
index f2e2c27ce..74896f010 100644
--- a/tests/bot/test_pagination.py
+++ b/tests/bot/test_pagination.py
@@ -18,18 +18,18 @@ class LinePaginatorTests(TestCase):
self.assertEqual(len(self.paginator._pages), 0)
def test_add_line_works_on_long_lines(self):
- """`add_line` should scale long lines up to `scale_to_size`."""
- self.paginator.add_line('x' * self.paginator.scale_to_size)
- self.assertEqual(len(self.paginator._pages), 1)
+ """After additional lines after `max_size` is exceeded should go on the next page."""
+ self.paginator.add_line('x' * self.paginator.max_size)
+ self.assertEqual(len(self.paginator._pages), 0)
# Any additional lines should start a new page after `max_size` is exceeded.
self.paginator.add_line('x')
- self.assertEqual(len(self.paginator._pages), 2)
+ self.assertEqual(len(self.paginator._pages), 1)
def test_add_line_continuation(self):
"""When `scale_to_size` is exceeded, remaining words should be split onto the next page."""
self.paginator.add_line('zyz ' * (self.paginator.scale_to_size//4 + 1))
- self.assertEqual(len(self.paginator._pages), 2)
+ self.assertEqual(len(self.paginator._pages), 1)
def test_add_line_no_continuation(self):
"""If adding a new line to an existing page would exceed `max_size`, it should start a new