qutebrowser/tests
toofar 117cb15b8d Handle selection model being None when clearing selection
Change `CompletionView.on_clear_completion_selection()` to call the Qt
selection model getter, instead of our one. Since it can be called when the
selection model has already been cleared and our one asserts that there
is a selection model to return.

Back in the distant past there was a change to handle the completion widget's
selection model being None when the `on_clear_completion_selection()` slot was
called: https://github.com/qutebrowser/qutebrowser/commit/88b522fa167e2f97b

More recently a common getter for the selection model was added so we could
have a single place to apply type narrowing to the returned object from the Qt
getter (the type hints had been updated to be wrapped in `Optional`): https://github.com/qutebrowser/qutebrowser/commit/92dea988c01e745#diff-1559d42e246323bea35fa064d54d48c990999aaf4c732b09ccd448f994da74cf

It seems this is one place where it does, and already did, handle that
optional. So it didn't need to change to use the new getter. This is called
from the `Command.on_mode_left` signal, not sure why the selection model is
None here. Perhaps it already gets cleared by the effects of the `hide_cmd`
signal that gets fired earlier, or perhaps even from the `self.hide()` on the
line before. Anyway, this was working for several years and seems harmless
enough.
2024-05-19 14:29:31 +12:00
..
end2end Fix some spelling errors 2024-05-09 10:58:04 -04:00
helpers Generalize (testdata) substitution in end2end tests 2023-09-05 12:20:02 +02:00
manual Rename :buffer to :tab-select 2021-01-20 18:00:38 +01:00
unit Handle selection model being None when clearing selection 2024-05-19 14:29:31 +12:00
conftest.py tests: Upgrade our hook implementation for pytest 7 2024-01-10 14:41:39 +01:00
test_conftest.py reuse: Initial copyright text update for myself 2023-07-23 12:49:05 +02:00