Add --no-flash option to rtv, fixes #478
This commit is contained in:
@@ -91,7 +91,8 @@ def test_config_get_args():
|
||||
'--copy-config',
|
||||
'--enable-media',
|
||||
'--theme', 'molokai',
|
||||
'--list-themes']
|
||||
'--list-themes',
|
||||
'--no-flash']
|
||||
|
||||
with mock.patch('sys.argv', ['rtv']):
|
||||
config_dict = Config.get_args()
|
||||
@@ -115,6 +116,7 @@ def test_config_get_args():
|
||||
assert config['enable_media'] is True
|
||||
assert config['theme'] == 'molokai'
|
||||
assert config['list_themes'] is True
|
||||
assert config['flash'] is False
|
||||
|
||||
|
||||
def test_config_link_deprecated():
|
||||
@@ -148,7 +150,8 @@ def test_config_from_file():
|
||||
'enable_media': True,
|
||||
'max_comment_cols': 150,
|
||||
'hide_username': True,
|
||||
'theme': 'molokai'}
|
||||
'theme': 'molokai',
|
||||
'flash': True}
|
||||
|
||||
bindings = {
|
||||
'REFRESH': 'r, <KEY_F5>',
|
||||
|
||||
@@ -93,6 +93,13 @@ def test_terminal_functions(terminal):
|
||||
terminal.stdscr.addch.assert_called_with(3, 5, 'ch', 'attr')
|
||||
|
||||
|
||||
def test_terminal_no_flash(terminal):
|
||||
|
||||
terminal.config['flash'] = False
|
||||
terminal.flash()
|
||||
assert not curses.flash.called
|
||||
|
||||
|
||||
def test_terminal_clean_ascii(terminal):
|
||||
|
||||
terminal.config['ascii'] = True
|
||||
@@ -662,4 +669,4 @@ def test_set_theme_no_colors(terminal, stdscr):
|
||||
assert not terminal.theme.use_color
|
||||
|
||||
terminal.set_theme(Theme(use_color=True))
|
||||
assert not terminal.theme.use_color
|
||||
assert not terminal.theme.use_color
|
||||
|
||||
Reference in New Issue
Block a user