Florian Bruhin
f98b8a240e
Fix flake8
2017-07-04 15:09:23 +02:00
Florian Bruhin
acf85eb96b
Stabilize qute://settings test
2017-07-04 15:09:23 +02:00
Florian Bruhin
79c11d6008
Skip test_configdata.test_init_benchmark on Travis in Docker
...
See #2777
2017-07-04 15:09:23 +02:00
Florian Bruhin
65585b313d
test_configtypes: Rename test_to_py to _valid for consistency
2017-07-04 15:09:23 +02:00
Florian Bruhin
9ac2dbcc80
Disallow surrogate escapes in dicts and lists in the config
...
In Dict.to_str() and List.to_str() we use json.dump to get a value. However,
JSON includes surrogate escapes in the dumped values, which breaks round trips.
>>> yaml.load(json.dumps({'\U00010000': True}))
{'\ud800\udc00': True}
>>> yaml.load(json.dumps({'\U00010000': True}, ensure_ascii=False))
yaml.reader.ReaderError: unacceptable character #x10000: special characters are not allowed
See:
https://stackoverflow.com/a/38552626/2085149
https://news.ycombinator.com/item?id=12798032
2017-07-04 15:09:23 +02:00
Florian Bruhin
fa0f4e1101
Improve test_configtypes.TestDict
...
We didn't have to_py tests there before.
2017-07-04 15:09:23 +02:00
Florian Bruhin
f00e91e85e
Don't set valid_values in test_configtypes.TestList
...
Most of the time we want to check values without them being outright rejected by
ValidValues.
2017-07-04 15:09:23 +02:00
Florian Bruhin
05f4f2e742
Fix TestDict.test_hypothesis_text for unordered dicts
2017-07-04 15:09:23 +02:00
Florian Bruhin
ea2b9f5596
Remove old comment
...
The recursion is caught in test_config
2017-07-04 15:09:15 +02:00
Florian Bruhin
0528a800f2
Fix config things relying on dict order
2017-07-04 15:08:04 +02:00
Florian Bruhin
8933b4c5da
Avoid calling configdata.init() in tests
...
It takes unnecessary time (20ms without C extensions) to initialize it over and
over again - and for some reason, it takes 20s (!) on Travis.
2017-07-04 15:08:04 +02:00
Florian Bruhin
9db4a8cb43
Clean up test_cache
2017-07-04 15:08:04 +02:00
Florian Bruhin
9dfe4429d7
Import qutebrowser.app in conftest
2017-07-04 15:08:04 +02:00
Florian Bruhin
b42265212b
Update test_keyhints for new config
...
This also makes the keyhint display things sorted
2017-07-04 15:08:04 +02:00
Florian Bruhin
4bebfd8d5f
Update test_modeparsers for new config
2017-07-04 15:08:04 +02:00
Florian Bruhin
d5cd0b19b0
Update test_basekeyparser for new config
2017-07-04 15:08:04 +02:00
Florian Bruhin
22b0f2fd24
Various simple test updates for new config
...
test_cache
test_cookies
test_webkitelem
test_cmdutils
test_runners
test_completionwidget
test_messageview
test_editor
test_miscwidgets
test_sessions
test_urlutils
test_utils
test_prompt
statusbar/test_*
test_cmdhistory
test_tabwidget
test_tab
test_downloads
test_networkmanager
2017-07-04 15:08:04 +02:00
Florian Bruhin
1663280f53
Update test_shared for new config
...
Also, make accept_language none_ok=True like it was in the old configdata.py
2017-07-04 15:08:04 +02:00
Florian Bruhin
7dd5e4b2e6
Skip broken completion tests
...
This skips test_completer and test_models - we'll reintroduce them when merging
the new completion.
2017-07-04 15:08:04 +02:00
Florian Bruhin
ff05560047
Update test_adblock for new config
...
This required some changes on how URLs are handled during those tests. Before,
we simply could return a path and (since we had a patched QNAM), nobody
complained.
Now this actually needs to be a valid URL, so we use
https://www.example.com/path everywhere instead.
2017-07-04 15:08:04 +02:00
Florian Bruhin
78d7ac311f
Use fonts.monospace properly
2017-07-04 15:08:04 +02:00
Florian Bruhin
a36f5bafc1
Rename content.javascript.can_*_windows to _tabs
2017-07-04 15:08:04 +02:00
Florian Bruhin
5ada3606d8
Allow to not send the DNT header
2017-07-04 15:08:04 +02:00
Florian Bruhin
202b8445f6
Move content.accept_language under headers
2017-07-04 15:08:04 +02:00
Florian Bruhin
8712fc6fd3
Move new_instance_open_target out of url.
...
It doesn't really fit there really...
See 3cf028db23cbfe256e499d8881c3c2856f224d94
2017-07-04 15:08:04 +02:00
Florian Bruhin
d641652a92
More test_config improvements
2017-07-04 15:08:04 +02:00
Florian Bruhin
c214acd899
Remove config from objreg
2017-07-04 15:08:04 +02:00
Florian Bruhin
f8a88ae042
Clean up objreg properly in config tests
2017-07-04 15:08:04 +02:00
Florian Bruhin
54adf3898a
Add test_configfiles.py
2017-07-04 15:08:04 +02:00
Florian Bruhin
1a492e9f4a
Re-add backend checks to new config
2017-07-04 15:08:04 +02:00
Florian Bruhin
556f49d367
Add PACFetcher.fetch
...
Let's not try to download proxies during tests...
2017-07-04 15:08:04 +02:00
Florian Bruhin
215fd2f055
More test_config fixes/tests
2017-07-04 15:08:04 +02:00
Florian Bruhin
009ed3584d
Reorder tests
2017-07-04 15:08:04 +02:00
Florian Bruhin
2b9b54cf6b
Tests and improvements for ConfigContainer
2017-07-04 15:08:03 +02:00
Florian Bruhin
4495e721d8
Tests and fixes for config.Config
2017-07-04 15:08:03 +02:00
Florian Bruhin
2c3981e57e
Get rid of Config.read_configdata()
...
No need for this indirection
2017-07-04 15:08:03 +02:00
Florian Bruhin
07d0ea6a54
Unit tests and improvements for :bind/:unbind
2017-07-04 15:08:03 +02:00
Florian Bruhin
353c10aee7
Add a separate qutescheme BDD file
2017-07-04 15:08:03 +02:00
Florian Bruhin
3edebce833
Add tests for :set
2017-07-04 15:08:03 +02:00
Florian Bruhin
31b999ea59
Tests and improvements for KeyConfig
2017-07-04 15:08:03 +02:00
Florian Bruhin
725ffef5f3
Use a real config object in unit tests
2017-07-04 15:08:03 +02:00
Florian Bruhin
978013e750
Fix CommandParser and don't use a generator
2017-07-04 15:08:03 +02:00
Florian Bruhin
a8c7e8ba05
Add first config tests
2017-07-04 15:08:03 +02:00
Florian Bruhin
28670f8e48
Move config.style into config.config and refactor it
2017-07-04 15:08:03 +02:00
Florian Bruhin
81d6406e14
Update test_stylesheet
2017-07-04 15:08:03 +02:00
Florian Bruhin
a5c8a52dd5
Update config_stub for tests
2017-07-04 15:08:03 +02:00
Florian Bruhin
0dc95aceed
Clean up old test_config.py
2017-07-04 15:08:03 +02:00
Florian Bruhin
df1685905e
Add content.headers and content.cache groups
2017-07-04 15:08:03 +02:00
Florian Bruhin
50602cbf26
Add an url. group to settings
2017-07-04 15:08:03 +02:00
Florian Bruhin
065f82f485
Fix endless recursion while validating aliases
2017-07-04 15:08:03 +02:00