configdata: Make sure default values are valid
This commit is contained in:
parent
0857a45b0a
commit
18eb133811
@ -76,7 +76,7 @@ editor.command:
|
||||
type:
|
||||
name: ShellCommand
|
||||
placeholder: true
|
||||
default: "gvim -f '{}'"
|
||||
default: ["gvim", "-f", "{}"]
|
||||
desc: >-
|
||||
The editor (and arguments) to use for the `open-editor` command.
|
||||
|
||||
|
@ -28,10 +28,12 @@ from qutebrowser.utils import usertypes
|
||||
|
||||
|
||||
def test_init():
|
||||
"""Test reading the default yaml file."""
|
||||
"""Test reading the default yaml file and validating the values."""
|
||||
configdata.init()
|
||||
assert isinstance(configdata.DATA, dict)
|
||||
assert 'ignore_case' in configdata.DATA
|
||||
for option in configdata.DATA.values():
|
||||
option.typ.from_py(option.default)
|
||||
|
||||
|
||||
def test_init_benchmark(benchmark):
|
||||
@ -40,7 +42,6 @@ def test_init_benchmark(benchmark):
|
||||
|
||||
class TestReadYaml:
|
||||
|
||||
|
||||
def test_valid(self):
|
||||
data = textwrap.dedent("""
|
||||
test1:
|
||||
|
Loading…
Reference in New Issue
Block a user