qutebrowser/tests/unit/keyinput
Florian Bruhin 5b6d2c60b4 Fix bindings.key_mappings with multiple keys
Otherwise, when e.g. doing "<Meta+Up>": "gg" in bindings.key_mappings,
there's a crash like:

    Traceback (most recent call last):
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/eventfilter.py", line 105, in eventFilter
        return handler(typing.cast(QKeyEvent, event))
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/eventfilter.py", line 75, in _handle_key_event
        return man.handle_event(event)
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/modeman.py", line 462, in handle_event
        return handler(cast(QKeyEvent, event))
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/modeman.py", line 283, in _handle_keypress
        match = parser.handle(event, dry_run=dry_run)
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/modeparsers.py", line 105, in handle
        match = super().handle(e, dry_run=dry_run)
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/basekeyparser.py", line 309, in handle
        result = self._match_key_mapping(result.sequence)
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/basekeyparser.py", line 246, in _match_key_mapping
        mapped = sequence.with_mappings(
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/keyutils.py", line 675, in with_mappings
        assert len(new_seq) == 1
    AssertionError

While this isn't the intended way to use this setting, we shouldn't
crash - and let's just make it work instead of forbidding it.
2021-03-20 11:10:30 +01:00
..
conftest.py doc: Switch URLs to https 2021-01-26 15:19:01 +01:00
key_data.py doc: Switch URLs to https 2021-01-26 15:19:01 +01:00
test_basekeyparser.py Qtbot methods changed to snake case,snake case check added 2021-02-26 22:07:08 +01:00
test_bindingtrie.py doc: Switch URLs to https 2021-01-26 15:19:01 +01:00
test_keyutils.py Fix bindings.key_mappings with multiple keys 2021-03-20 11:10:30 +01:00
test_modeman.py doc: Switch URLs to https 2021-01-26 15:19:01 +01:00
test_modeparsers.py doc: Switch URLs to https 2021-01-26 15:19:01 +01:00