From 91b72ef29289ace1b323786dbb7743044f9dd35d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 9 Apr 2015 21:19:37 +0200 Subject: [PATCH] Add a test to validate the default key config. --- tests/config/test_config.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/config/test_config.py b/tests/config/test_config.py index 6bee98ee4..37ab94c26 100644 --- a/tests/config/test_config.py +++ b/tests/config/test_config.py @@ -31,7 +31,9 @@ from PyQt5.QtCore import QObject from PyQt5.QtGui import QColor import pytest -from qutebrowser.config import config, configexc +from qutebrowser.config import config, configexc, configdata +from qutebrowser.config.parsers import keyconf +from qutebrowser.commands import runners from qutebrowser.utils import objreg, standarddir @@ -164,6 +166,16 @@ class TestDefaultConfig: conf = config.ConfigManager(None, None) conf._validate_all() + def test_default_key_config(self): + """Test validating of the default key config.""" + # We import qutebrowser.app so the cmdutils.register decorators run. + import qutebrowser.app + conf = keyconf.KeyConfigParser(None, None) + runner = runners.CommandRunner(win_id=0) + for sectname in configdata.KEY_DATA: + for cmd in conf.get_bindings_for(sectname).values(): + runner.parse(cmd, aliases=False) + class TestConfigInit: