Florian Bruhin
9f10fa105c
Merge adblock.feature into misc.feature
2017-10-03 13:42:04 +02:00
Florian Bruhin
2f9d1875cd
Clear BDD process settings between each test
...
Fixes #1310
2017-10-03 13:38:16 +02:00
Florian Bruhin
9383452ab9
Use a real YAML config for config tests
2017-10-03 13:06:50 +02:00
Florian Bruhin
ed8c3f4aa2
Add :config-clear and :config-unset
...
See #2794
2017-10-03 12:45:39 +02:00
Florian Bruhin
3772084cbf
Adjust test_histcategory for NOT NULL constraints
2017-10-03 10:28:36 +02:00
Florian Bruhin
ad867a3b90
Merge branch 'pr/3024'
2017-10-03 10:17:01 +02:00
Florian Bruhin
4ed60efa80
Add missing qapp fixture
2017-10-03 07:38:10 +02:00
Florian Bruhin
f533e3b751
Move config toggling to :config-cycle
...
This removes :set option! and allows :config-cycle option instead.
2017-10-03 07:38:10 +02:00
Florian Bruhin
81993a70a2
Split off :config-cycle from :set
...
Before, we allowed :set to take multiple values, which often lead to confusing
error messages when a user forgot to quote the value.
Now, we instead have a dedicated :config-cycle command for that.
See #1840 , #2794
2017-10-03 07:37:55 +02:00
Michael Hoang
8ae0bd2797
Update :buffer tests for count support
2017-10-02 23:44:04 +11:00
Florian Bruhin
5af8a95c82
Refactor SQL error handling
...
This renames SqlException to SqlError (to be more consistent with how Python
names exceptions), and adds an utility function which logs a few more useful
details about errors.
See #3004
2017-10-02 09:48:15 +02:00
Florian Bruhin
506b1cdbc1
Improve input.insert_mode.auto_load tests
...
This also adds a test for #2858 (also see #2879 )
2017-10-02 09:04:37 +02:00
Florian Bruhin
fbf9817dcb
Rename test classes
2017-10-02 07:15:00 +02:00
Florian Bruhin
a8fc561707
Split config commands off to their own file.
2017-10-02 07:08:30 +02:00
Florian Bruhin
a273baf8a0
Make sure :bind/unbind works properly when bindings.commands is None
...
To make this work, we should never return None when trying to get bindings to
modify.
Fixes #3026
2017-10-01 21:43:00 +02:00
Florian Bruhin
4b9bbaa04d
Skip test_force_software_rendering with QtWebKit
2017-09-28 17:30:53 +02:00
Florian Bruhin
45db0eaccb
Really force QtWebEngine for test_force_software_rendering init
2017-09-28 11:44:21 +02:00
Florian Bruhin
6496442503
Skip test_force_software_rendering on CI
...
We can't be sure we have hardware acceleration there
2017-09-28 11:42:02 +02:00
Florian Bruhin
6c25e96621
Remove unused imports
2017-09-28 11:38:52 +02:00
Florian Bruhin
3be0a78819
Fix configinit tests
2017-09-28 11:05:53 +02:00
Florian Bruhin
45c6ffe991
Add a test for force_software_rendering
2017-09-28 10:04:47 +02:00
Florian Bruhin
35beb84e85
Fix tests and lint
2017-09-28 09:38:57 +02:00
Florian Bruhin
b906c862bb
Remove ipc-server from objreg
2017-09-28 08:52:32 +02:00
Florian Bruhin
6573888dc6
Fix :bind completion with invalid commands
...
Now that Command doesn't validate things anymore, we can't rely on parsing to
work.
2017-09-27 11:10:25 +02:00
Florian Bruhin
9607f3de59
Improve type documentation of settings
...
Use .get_name() for the docs
2017-09-27 08:25:52 +02:00
Florian Bruhin
c694bff902
Allow direct values for url.start_pages and content.user_stylesheets
2017-09-27 08:21:03 +02:00
Florian Bruhin
b96ba8e41f
Merge pull request #3031 from qutebrowser/pyup-scheduled-update-09-25-2017
...
Scheduled weekly dependency update for week 39
2017-09-26 08:43:23 +02:00
Florian Bruhin
dba631102a
Try to stabilize :window-only test
2017-09-26 08:41:07 +02:00
Florian Bruhin
38449e3e2b
Make sure the autoconfig.yml is saved periodically
...
Fixes #2982
2017-09-26 06:41:55 +02:00
Florian Bruhin
38038df703
Compare objects with :set with multiple values
2017-09-25 21:24:12 +02:00
Florian Bruhin
1086e31f28
Split up configinit tests
2017-09-25 21:24:12 +02:00
Florian Bruhin
6aed6bca93
Make loading autoconfig.yml opt-in when a config.py exists
...
This lets the user control the precedence those files should have, and also
simplifies the code quite a bit.
Fixes #2975
2017-09-25 21:24:12 +02:00
Florian Bruhin
5a080207ff
Bump up hypothesis deadline some more
2017-09-25 21:20:30 +02:00
Florian Bruhin
c7c198b949
Stabilize hint test
2017-09-25 08:22:40 +02:00
Florian Bruhin
40f0f75ad5
Improve error message for duplicate keys in config.py
2017-09-24 19:43:30 +02:00
Ryan Roden-Corrent
888a1b8c57
Append multiple history backups on import.
...
Previously, a successful import of the text history into sqlite would
move 'history' to 'history.bak'. If history.bak already existed, this
would overwrite it on unix and fail on windows.
With this patch, the most recently imported history is appended to
history.bak to avoid data loss.
Resolves #3005 .
A few other options I considered:
1. os.replace:
- fast, simple, no error on Windows
- potential data loss
2. numbered backups (.bak.1, .bak.2, ...):
- fast, no data loss, but more complex
3. append each line to the backup as it is read:
- more efficient than current patch (no need to read history twice)
- potentially duplicate data if backup fails
2017-09-23 13:06:11 -04:00
Florian Bruhin
b8389e4496
Revert "Fix NUL byte error handling on Python 3.4"
...
This reverts commit a7d5a98cc4
.
Not needed anymore now that we dropped support.
2017-09-22 22:30:02 +02:00
Florian Bruhin
e8ceeceac8
Fix mock check with Python 3.5
...
Looks like .assert_not_called() doesn't work on function mocks with 3.5.
2017-09-22 22:28:40 +02:00
Florian Bruhin
4e46c34e5a
Use .assert_not_called() for mocks
2017-09-22 19:58:38 +02:00
Florian Bruhin
e27c54a5c1
Fix modeparser tests
2017-09-22 19:49:52 +02:00
Florian Bruhin
5be44756e3
Remove unused imports
2017-09-22 17:29:01 +02:00
Michal Siedlaczek
b840b8066b
Spell only when pyqt>=5.8
2017-09-22 11:16:59 -04:00
Florian Bruhin
1e2015be65
Make bindings win over mappings
...
Fixes #2995
2017-09-22 17:13:17 +02:00
Florian Bruhin
d5a1fff637
Move init stuff from config.py to configinit.py
...
Closes #2997
2017-09-22 14:11:54 +02:00
Florian Bruhin
501764d1cb
Fix documented default values for falsey non-strings
...
Fixes #3015 .
2017-09-22 13:18:27 +02:00
Florian Bruhin
7f8ae531aa
Add config.configdir and config.datadir to config API.
...
Fixes #1419
2017-09-22 09:59:46 +02:00
Florian Bruhin
9b22480b07
Raise config.py errors happening in tests
2017-09-22 09:09:45 +02:00
Florian Bruhin
1dbd156c2f
Simplify some config.py tests
2017-09-22 08:53:08 +02:00
Florian Bruhin
276b244466
Merge remote-tracking branch 'origin/pr/2970'
2017-09-22 08:37:23 +02:00
Florian Bruhin
10016ae240
Remove unused import
2017-09-22 08:23:06 +02:00
Jay Kamat
43ce10efc3
Simplify and reorganize configfile tests
...
Also make save/load of sys.path a little more robust
2017-09-22 02:05:55 -04:00
Jay Kamat
4e22b4666d
Convert save-restore of sys to a context-manager
...
Also improve and simplify tests for save/load of sys.module and sys.path
2017-09-22 02:05:55 -04:00
Jay Kamat
7ddde334da
Add tests for module/path isolation
2017-09-22 02:05:55 -04:00
Florian Bruhin
c652b0f96c
Remove old monkeypatch
2017-09-21 23:59:16 +02:00
Michal Siedlaczek
2150154350
Skip end2end spell tests if a dictionary is/isn't installed
2017-09-21 16:36:47 -04:00
Florian Bruhin
64b783d9c0
Do not validate commands in the config and with :bind
...
There are just way too many gotchas related to valid modes, aliases, and
circular dependencies when validating aliases/bindings in the config.
Let's just remove this and let invalid commands fail late, when they're actually
used.
2017-09-21 22:30:48 +02:00
Florian Bruhin
32b2b3dfd9
Add test for invalid value type in YAML file
2017-09-21 21:15:37 +02:00
Florian Bruhin
b1ddb9a6df
Remove confusing test
...
That's not the behavior we actually have in the config anymore when using
conf._yaml.load().
2017-09-21 20:27:45 +02:00
Florian Bruhin
691cd2d09b
More test_configfiles cleanups
2017-09-21 20:19:02 +02:00
Florian Bruhin
3e0d49a4b3
Add TestYaml class to test_configfiles
2017-09-21 19:57:54 +02:00
Florian Bruhin
f821fb793a
Initialize configdata in test_configfiles
2017-09-21 19:37:22 +02:00
Michal Siedlaczek
9e620ce6e9
Fix spell with new config
2017-09-21 12:09:55 -04:00
Florian Bruhin
7cad8f41f2
Remove unknown YAML data from config
...
I considered introducing another list of deleted options (or a "deleted: True"
in configdata.yml), similar to what we had with the old config.
However, let's take the easier route and just delete everything we don't know
from configdata.yml. If someone edits it by hand, it's their fault :P
See #2772 , #2847
2017-09-21 16:29:40 +02:00
Michal Siedlaczek
132b1f705e
Revert requirements changes
2017-09-21 09:56:38 -04:00
Michal Siedlaczek
329cfa5756
End2end tests for spell checking
2017-09-21 09:56:33 -04:00
Michal Siedlaczek
95592770a7
Fixing test dependencies and other test issues
2017-09-21 09:53:51 -04:00
Michal Siedlaczek
fac0e44a7e
Test all available languages and getting installed langs when the dir doesn't exist
2017-09-21 09:52:31 -04:00
Michal Siedlaczek
82433e04ad
Set default value for spelling settings and limit number of installed languages for testing
2017-09-21 09:52:09 -04:00
Michal Siedlaczek
c2197102a3
Enable spell checking and installing dictionaries for QtWebEngine
2017-09-21 09:51:52 -04:00
Florian Bruhin
cb57525f69
Fix whitespace
2017-09-21 13:43:30 +02:00
Florian Bruhin
a559477028
Merge remote-tracking branch 'origin/pr/2953'
2017-09-21 13:43:01 +02:00
Florian Bruhin
e0e7d4ca67
Stabilize test_quitting_process_expected
2017-09-21 13:42:24 +02:00
Florian Bruhin
53b1ffe953
Merge remote-tracking branch 'origin/pr/2965'
2017-09-21 09:12:56 +02:00
Florian Bruhin
9a6de48efa
Break long line
2017-09-21 09:12:25 +02:00
Florian Bruhin
fb33985f07
Merge remote-tracking branch 'origin/pr/2992'
2017-09-21 09:12:03 +02:00
Florian Bruhin
192c063743
Mark another window.open test as flaky
...
See https://travis-ci.org/qutebrowser/qutebrowser/jobs/277846887
2017-09-21 08:58:56 +02:00
Florian Bruhin
9913550688
Fix windows condition
2017-09-20 18:28:18 +02:00
Felix Van der Jeugt
6892705e18
cover setting-saving-loading-getting yaml config
2017-09-20 15:52:42 +02:00
Ryan Roden-Corrent
5cd00f699e
Resolve KeyError when deleting URL with space.
...
Resolves #2963 .
2017-09-20 07:15:59 -04:00
Ryan Roden-Corrent
f9440b8026
Use CommandParser for configmodel.bind.
...
The parsing bind() did manually is now available through CommandParser.
Resolves #2952 .
This also adds a unit test for the case when there is no current
binding, as I broke that while working on this and there was no test to
catch it :)
2017-09-20 07:05:38 -04:00
Florian Bruhin
1d964ccdaf
Only run system datadir test on Linux
2017-09-20 12:20:46 +02:00
Florian Bruhin
2a4f10f0f5
Add qapp for tabbed_browser_stubs
2017-09-20 11:30:18 +02:00
Florian Bruhin
46cfd5353d
Use a pytest marker to fake an OS
2017-09-20 11:30:18 +02:00
Florian Bruhin
ef1c83862b
Use utils.is_* for platform checks everywhere
2017-09-20 11:10:24 +02:00
Felix Van der Jeugt
285b534384
make changed dirty and save on duplicate write
2017-09-20 10:04:34 +02:00
Florian Bruhin
55cbb39127
Merge remote-tracking branch 'origin/pr/2999'
2017-09-20 08:48:22 +02:00
Florian Bruhin
a519d54e7d
Remove hypothesis strict setting
...
It was deprecated as normal python warnings are used now
2017-09-20 08:17:04 +02:00
Florian Bruhin
54ceb52eaf
Switch to using Item.get_report() for vulture
2017-09-20 08:17:04 +02:00
Florian Bruhin
22be2bf7ab
Fix circular import in ImportFake in test_version
...
We can't use importlib.import_module() when we patched that away...
2017-09-20 08:17:04 +02:00
Ryan Farley
dd4294de03
fix #2979 : use dictionary for mutable tracking
...
Using a dictionary instead of a list keeps only one working copy,
allowing consistency in between calls of update_mutables()
2017-09-19 16:26:02 -05:00
Florian Bruhin
3a5241b642
Start using attrs
...
Closes #1073
2017-09-19 22:21:45 +02:00
Ryan Farley
cc540bb166
Merge branch 'master' into mutable-dict
2017-09-19 14:07:46 -05:00
Ryan Farley
83473b9c69
fix test for new tuples
2017-09-19 14:00:44 -05:00
Felix Van der Jeugt
8db630d358
don't copy values but set dirty
2017-09-19 17:26:03 +02:00
Felix Van der Jeugt
7b192d426e
add unit test and fix issues with it
2017-09-19 15:30:28 +02:00
Florian Bruhin
7226750363
Bump up Hypothesis deadline globally
2017-09-19 15:08:56 +02:00
Florian Bruhin
bb073e1709
Bump up another hypothesis deadline
2017-09-19 13:38:44 +02:00
Florian Bruhin
248afde21e
configapi: Also allow mode as posarg
2017-09-19 13:18:44 +02:00
Florian Bruhin
e8ae672c93
Check for read errors in test_configfiles
2017-09-19 13:18:16 +02:00
Florian Bruhin
7d1549aaeb
Make mode optionally in ConfigAPI.bind and .unbind
2017-09-19 13:14:41 +02:00