Adding support for emacs terminals

This commit is contained in:
Michael Lazar
2017-11-04 15:20:58 -04:00
parent cd4d9509ae
commit 29ea05f5bb
3 changed files with 9 additions and 1 deletions

View File

@@ -108,6 +108,11 @@ def test_subreddit_title(subreddit_page, terminal, capsys):
out, _ = capsys.readouterr()
assert not out
with mock.patch.dict('os.environ', {'INSIDE_EMACS': '25.3.1,term:0.96'}):
subreddit_page.draw()
out, _ = capsys.readouterr()
assert not out
def test_subreddit_search(subreddit_page, terminal):
window = terminal.stdscr.subwin

View File

@@ -600,6 +600,7 @@ def test_set_theme(terminal, stdscr):
def test_set_theme_no_colors(terminal, stdscr):
# Monochrome should be forced if the terminal doesn't support color
with mock.patch('curses.has_colors') as has_colors:
has_colors.return_value = False