Updated help, switch help screen to PAGER.
This commit is contained in:
@@ -71,9 +71,9 @@ def test_page_unauthenticated(reddit, terminal, config, oauth):
|
||||
assert sys_exit.called
|
||||
|
||||
# Show help
|
||||
page.controller.trigger('?')
|
||||
message = '[Basic Commands]'.encode('utf-8')
|
||||
terminal.stdscr.subwin.addstr.assert_any_call(1, 1, message)
|
||||
with mock.patch('subprocess.Popen') as Popen:
|
||||
page.controller.trigger('?')
|
||||
assert Popen.called
|
||||
|
||||
# Sort content
|
||||
page.controller.trigger('1')
|
||||
|
||||
@@ -189,12 +189,12 @@ def test_show_notification(terminal, stdscr, use_ascii):
|
||||
assert stdscr.subwin.addstr.call_count == 3
|
||||
stdscr.reset_mock()
|
||||
|
||||
# The whole message should fit in 40x80
|
||||
# The text should be trimmed to fit 40x80
|
||||
text = HELP.strip().splitlines()
|
||||
terminal.show_notification(text)
|
||||
assert stdscr.subwin.nlines == len(text) + 2
|
||||
assert stdscr.subwin.ncols == 80
|
||||
assert stdscr.subwin.addstr.call_count == len(text)
|
||||
assert stdscr.subwin.nlines == 40
|
||||
assert stdscr.subwin.ncols <= 80
|
||||
assert stdscr.subwin.addstr.call_count == 38
|
||||
stdscr.reset_mock()
|
||||
|
||||
# The text should be trimmed to fit in 20x20
|
||||
|
||||
Reference in New Issue
Block a user