Remove auto_save.config setting
This is not needed anymore now that we have config.load_autoconfig=False and wasn't even read anywhere.
This commit is contained in:
parent
1bcc66b5b9
commit
c8f3743008
@ -10,7 +10,6 @@
|
|||||||
|==============
|
|==============
|
||||||
|Setting|Description
|
|Setting|Description
|
||||||
|<<aliases,aliases>>|Aliases for commands.
|
|<<aliases,aliases>>|Aliases for commands.
|
||||||
|<<auto_save.config,auto_save.config>>|Save the config automatically on quit.
|
|
||||||
|<<auto_save.interval,auto_save.interval>>|How often (in milliseconds) to auto-save config/cookies/etc.
|
|<<auto_save.interval,auto_save.interval>>|How often (in milliseconds) to auto-save config/cookies/etc.
|
||||||
|<<auto_save.session,auto_save.session>>|Always restore open sites when qutebrowser is reopened.
|
|<<auto_save.session,auto_save.session>>|Always restore open sites when qutebrowser is reopened.
|
||||||
|<<bindings.commands,bindings.commands>>|Keybindings mapping keys to commands in different modes.
|
|<<bindings.commands,bindings.commands>>|Keybindings mapping keys to commands in different modes.
|
||||||
@ -263,19 +262,6 @@ Default:
|
|||||||
- +pass:[w]+: +pass:[session-save]+
|
- +pass:[w]+: +pass:[session-save]+
|
||||||
- +pass:[wq]+: +pass:[quit --save]+
|
- +pass:[wq]+: +pass:[quit --save]+
|
||||||
|
|
||||||
[[auto_save.config]]
|
|
||||||
=== auto_save.config
|
|
||||||
Save the config automatically on quit.
|
|
||||||
|
|
||||||
Type: <<types,Bool>>
|
|
||||||
|
|
||||||
Valid values:
|
|
||||||
|
|
||||||
* +true+
|
|
||||||
* +false+
|
|
||||||
|
|
||||||
Default: +pass:[true]+
|
|
||||||
|
|
||||||
[[auto_save.interval]]
|
[[auto_save.interval]]
|
||||||
=== auto_save.interval
|
=== auto_save.interval
|
||||||
How often (in milliseconds) to auto-save config/cookies/etc.
|
How often (in milliseconds) to auto-save config/cookies/etc.
|
||||||
|
@ -87,11 +87,6 @@ session_default_name:
|
|||||||
|
|
||||||
## auto_save
|
## auto_save
|
||||||
|
|
||||||
auto_save.config:
|
|
||||||
type: Bool
|
|
||||||
default: true
|
|
||||||
desc: Save the config automatically on quit.
|
|
||||||
|
|
||||||
auto_save.interval:
|
auto_save.interval:
|
||||||
type:
|
type:
|
||||||
name: Int
|
name: Int
|
||||||
|
@ -347,14 +347,14 @@ class TestSetConfigCommand:
|
|||||||
assert msg.text == 'url.auto_search = dns'
|
assert msg.text == 'url.auto_search = dns'
|
||||||
|
|
||||||
def test_set_toggle(self, commands, config_stub):
|
def test_set_toggle(self, commands, config_stub):
|
||||||
"""Run ':set auto_save.config!'.
|
"""Run ':set auto_save.session!'.
|
||||||
|
|
||||||
Should toggle the value.
|
Should toggle the value.
|
||||||
"""
|
"""
|
||||||
assert config_stub.val.auto_save.config
|
assert not config_stub.val.auto_save.session
|
||||||
commands.set(0, 'auto_save.config!')
|
commands.set(0, 'auto_save.session!')
|
||||||
assert not config_stub.val.auto_save.config
|
assert config_stub.val.auto_save.session
|
||||||
assert not config_stub._yaml.values['auto_save.config']
|
assert config_stub._yaml.values['auto_save.session']
|
||||||
|
|
||||||
def test_set_toggle_nonbool(self, commands, config_stub):
|
def test_set_toggle_nonbool(self, commands, config_stub):
|
||||||
"""Run ':set url.auto_search!'.
|
"""Run ':set url.auto_search!'.
|
||||||
@ -368,13 +368,13 @@ class TestSetConfigCommand:
|
|||||||
assert config_stub.val.url.auto_search == 'naive'
|
assert config_stub.val.url.auto_search == 'naive'
|
||||||
|
|
||||||
def test_set_toggle_print(self, commands, config_stub, message_mock):
|
def test_set_toggle_print(self, commands, config_stub, message_mock):
|
||||||
"""Run ':set -p auto_save.config!'.
|
"""Run ':set -p auto_save.session!'.
|
||||||
|
|
||||||
Should toggle the value and show the new value.
|
Should toggle the value and show the new value.
|
||||||
"""
|
"""
|
||||||
commands.set(0, 'auto_save.config!', print_=True)
|
commands.set(0, 'auto_save.session!', print_=True)
|
||||||
msg = message_mock.getmsg(usertypes.MessageLevel.info)
|
msg = message_mock.getmsg(usertypes.MessageLevel.info)
|
||||||
assert msg.text == 'auto_save.config = false'
|
assert msg.text == 'auto_save.session = true'
|
||||||
|
|
||||||
def test_set_invalid_option(self, commands):
|
def test_set_invalid_option(self, commands):
|
||||||
"""Run ':set foo bar'.
|
"""Run ':set foo bar'.
|
||||||
@ -385,14 +385,14 @@ class TestSetConfigCommand:
|
|||||||
commands.set(0, 'foo', 'bar')
|
commands.set(0, 'foo', 'bar')
|
||||||
|
|
||||||
def test_set_invalid_value(self, commands):
|
def test_set_invalid_value(self, commands):
|
||||||
"""Run ':set auto_save.config blah'.
|
"""Run ':set auto_save.session blah'.
|
||||||
|
|
||||||
Should show an error.
|
Should show an error.
|
||||||
"""
|
"""
|
||||||
with pytest.raises(cmdexc.CommandError,
|
with pytest.raises(cmdexc.CommandError,
|
||||||
match="set: Invalid value 'blah' - must be a "
|
match="set: Invalid value 'blah' - must be a "
|
||||||
"boolean!"):
|
"boolean!"):
|
||||||
commands.set(0, 'auto_save.config', 'blah')
|
commands.set(0, 'auto_save.session', 'blah')
|
||||||
|
|
||||||
def test_set_wrong_backend(self, commands, monkeypatch):
|
def test_set_wrong_backend(self, commands, monkeypatch):
|
||||||
monkeypatch.setattr(objects, 'backend', usertypes.Backend.QtWebEngine)
|
monkeypatch.setattr(objects, 'backend', usertypes.Backend.QtWebEngine)
|
||||||
|
Loading…
Reference in New Issue
Block a user