summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2021-02-03Only warn about autoconfig for the top-level config.pyFlorian Bruhin
If we are e.g. loading a secondary file via config.source() before config.load_autoconfig(False) has been called in the main one, we don't care about the warning. Neither should :config-source fail if we started with the warning for the main config. Fixes #6099
2021-02-03Adjust tests for hints.leave_on_mode changeFlorian Bruhin
(cherry picked from commit 985c711e49d9503e52964766fceda78802aae656)
2021-02-03Adopt tests from master branchFlorian Bruhin
2021-02-03Improve rebuilding of history databaseFlorian Bruhin
- Re-add the force_rebuild key which we need internally again. This partially reverts changes from: * cd0000f728459f208c4cf69f29b603fbcab6ffb4 * 1a9b59fcfa73d1505834d8461ee166f07fb201cd * 93ecd8f72f108743948f0d1881055ff2337058ec - Instead of checking self.completion to figure out whether we need to rebuild anything, check 'self' (i.e. the History table, not the CompletionHistory table). If something went wrong during the last rebuild, the CompletionHistory might still be empty, but History is what actually matters to figure out whether to rebuild. - Set force_rebuild while rebuilding the history, so that a possible interruption of the process (e.g. by a killed process or crash) results in another rebuild from scratch. - Bump up the user version again, so that we re-add force_rebuild to the database. This also forces another rebuild which helps with possible inconsistent data when someone interrupted the earlier rebuild for v2.0.0. Fixes #6111 (cherry picked from commit 2b47bd01dbc15a02911989a190e2ef956aeedf27)
2021-01-28Add a warning if QTWEBENGINE_CHROMIUM_FLAGS is setFlorian Bruhin
See #6065 (cherry picked from commit 38fec3726fc0aa518a3637574f7e3e0029df41d4)
2021-01-28Fix resource globbing with Python .egg installsFlorian Bruhin
When qutebrowser is installed as an .egg (like can happen with setup.py install), importlib.resources.files(...) can return a zipfile.Path in place of a pathlib.Path. Unfortunately, those path objects don't support .glob(), nor do they support things like .relative_to() or .as_posix(). Thus, if that's the case, we need to implement our own poor globbing based on .iterdir() (which they *do* support). (cherry picked from commit 54bcdc1eefa86cc20790973d6997b60c3bba884c)
2021-01-27tests: Fix ~ completion test on WindowsFlorian Bruhin
2021-01-27tests: Use different workaround for mimetypes issueFlorian Bruhin
2021-01-27tests: Work around mimetype issueFlorian Bruhin
2021-01-27tests: Run service worker workaround test on WindowsFlorian Bruhin
2021-01-27tests: Ignore DXVAVDA errorsFlorian Bruhin
2021-01-27Only show changelog after feature upgradesFlorian Bruhin
2021-01-27Show changelog after upgradesFlorian Bruhin
2021-01-27Use right utils moduleFlorian Bruhin
Whoops...
2021-01-27Skip broken test on WindowsFlorian Bruhin
Proper fix in progress...
2021-01-27command: Improve deprecationFlorian Bruhin
Add a test and also allow setting a deprecated alias for a command easily.
2021-01-27tests: Skip "Using JS after window.open" on WindowsFlorian Bruhin
Seems to be flaky pretty consistantly there... See #5390
2021-01-27Add qt.workarounds.remove_service_workers settingFlorian Bruhin
See #5656, #5634
2021-01-27tests: Make sure testprocess actually quitsFlorian Bruhin
2021-01-26tests: Skip broken check_coverage test for Python 3.10Florian Bruhin
See #6068 Probably https://github.com/nedbat/coveragepy/issues/1106
2021-01-26Update test_typed_args for lazy annotationsFlorian Bruhin
This unfortunately gets quite a bit more cumbersome, as we can't easily parametrize an annotation anymore - the former `typ` will just be lazily evaluated as the string "typ". Closes #5769
2021-01-26Add initial support for Python 3.10 annotationsFlorian Bruhin
PEP 563: https://www.python.org/dev/peps/pep-0563/ See #5769
2021-01-26Get rid of IOErrorFlorian Bruhin
It's an alias to OSError since Python 3.3: https://docs.python.org/3/library/exceptions.html https://www.python.org/dev/peps/pep-3151/
2021-01-26Separate utils.read_file and read_file_binaryFlorian Bruhin
See #4467
2021-01-26Get rid of utils.resource_filenameFlorian Bruhin
See #4467
2021-01-26Serve resource files from qute://resourceFlorian Bruhin
See #4467, #5832
2021-01-26doc: Switch URLs to httpsFlorian Bruhin
2021-01-26tests: Update properly for importlib_resourcesFlorian Bruhin
See #4667
2021-01-22Support Super as modifier nameFlorian Bruhin
See https://github.com/qutebrowser/qutebrowser/discussions/5999#discussioncomment-297309
2021-01-20Bump copyright yearsFlorian Bruhin
Closes #6015
2021-01-20Various default setting changesFlorian Bruhin
See #6022 and #5999
2021-01-20Rename :enter-mode and :leave-modeFlorian Bruhin
See #6022
2021-01-20Rename :follow-hint to :hint-followFlorian Bruhin
See #6022
2021-01-20Rename selection commandsFlorian Bruhin
See #6022
2021-01-20Rename :open-editor to :edit-textFlorian Bruhin
See #6022
2021-01-20Rename :buffer to :tab-selectFlorian Bruhin
See #6022
2021-01-20Rename :run-macro and :record-macroFlorian Bruhin
See #6022
2021-01-20config: Improve error handling for missing sectionsFlorian Bruhin
When the user does something like this with the new adblocking config: c.content.host_blocking.lists = ... Then we didn't notify her about the setting being renamed. Instead, she got: While getting 'content.host_blocking': No option 'content.host_blocking' Unhandled exception: 'NoneType' object has no attribute 'lists' Traceback (most recent call last): File ".../qutebrowser/config/configfiles.py", line 805, in read_config_py exec(code, module.__dict__) File "/tmp/config.py", line 1, in <module> c.content.host_blocking.lists = [] AttributeError: 'NoneType' object has no attribute 'lists' This happens because we did something like (simplified): with self._handle_error(...): return self._config.get(...) # End of method Thus, if there was an error, nothing is returned and the method ends, therefore returning an implicit None. When then trying to access .lists on that None, we get the AttributeError. Instead, we now permit this kind of wrong usage in config.py files. If this is a qutebrowser-internal ConfigContainer, we would've already raised in _handle_error() anyways. What we now do instead is returning a new ConfigContainer, i.e. allowing further access (while still capturing the error message). Thus, this now leads to: While getting 'content.host_blocking': No option 'content.host_blocking' While setting 'content.host_blocking.lists': No option 'content.host_blocking.lists' (this option was renamed to 'content.blocking.hosts.lists') This still isn't optimal, but the best we can do without more magic: At the point the first failure happens, we can't tell whether the user wants to get an option or is just getting a prefix. Fixes #5991
2021-01-20Improve tests for filesystem completionFlorian Bruhin
2021-01-20Minor reformatFlorian Bruhin
2021-01-20Merge remote-tracking branch 'origin/pr/6038' into devFlorian Bruhin
2021-01-19Add some testsAndrew MacFie
2021-01-19Add filesystem completion to defaultAndrew MacFie
2021-01-19Refactor configtype __init__ methodsFlorian Bruhin
- Move the "completions" argument (to override completions) to BaseType so any class can use it. - Don't use **kwargs anywhere for better type checking. - Make arguments kw-only where useful.
2021-01-19Fix file select warningFlorian Bruhin
2021-01-19Merge remote-tracking branch 'origin/pr/5987'Florian Bruhin
2021-01-19tests: Adjust workaround for windowsFlorian Bruhin
2021-01-19tests: Work around vulture path printing issueFlorian Bruhin
See https://github.com/jendrikseipp/vulture/pull/246
2021-01-18Clearer assertions, updated tests to assert correct errorsAxel Dahlberg
2021-01-17rfc6266: Add commentFlorian Bruhin