'Test various command bindings.
See https://github.com/qutebrowser/qutebrowser/issues/615
Args:
cmdline_test: A pytest fixture which provides testcases.'

def test_cmd_binding(self, cmdline_test, config_stub, tmpdir):

    config_stub.data = {'aliases': []}
    kcp = keyconf.KeyConfigParser(str(tmpdir), 'keys.conf')
    kcp._cur_section = 'normal'
    if cmdline_test.valid:
        kcp._read_command(cmdline_test.cmd)
    else:
        with pytest.raises(keyconf.KeyConfigError):
            kcp._read_command(cmdline_test.cmd)
