Commit Graph

1178 Commits

Author SHA1 Message Date
Florian Bruhin
f5d2c48bbb Fix new keyconfig issues 2017-07-04 15:08:02 +02:00
Florian Bruhin
dc74a55b84 Fix remaining configtypes issues 2017-07-04 15:08:02 +02:00
Florian Bruhin
3392ccc58b test_configtypes fixes 2017-07-04 15:08:02 +02:00
Florian Bruhin
ecba175b16 Test and fix configtypes to_str. 2017-07-04 15:08:02 +02:00
Florian Bruhin
d69c6d0c66 Reorganize how configtypes store their data
Now the "object" kind of value (like in YAML) is stored internally, and that's
the canonical value. The methods changed their meaning slightly, see the
docstring in configtypes.py for details.
2017-07-04 15:08:02 +02:00
Florian Bruhin
1cbb4ece4b Force configtype.Dict keys to be strings 2017-07-04 15:08:02 +02:00
Florian Bruhin
41655e7852 Fix handling of none_ok in List/Dict
We now always return None (and '' as string) when the user configured an empty
list or dict.
2017-07-04 15:08:01 +02:00
Florian Bruhin
8ea3d92697 Initial implementation of to_str for configtypes 2017-07-04 15:08:01 +02:00
Florian Bruhin
fede64ba7a Add test for configdata.is_valid_prefix 2017-07-04 15:08:01 +02:00
Florian Bruhin
18eb133811 configdata: Make sure default values are valid 2017-07-04 15:08:01 +02:00
Florian Bruhin
0857a45b0a configtypes: parse regex flags properly 2017-07-04 15:08:01 +02:00
Florian Bruhin
6733e92b50 Handle files correctly in utils.yaml_dump 2017-07-04 15:08:01 +02:00
Florian Bruhin
001312ca82 Disallow Booleans for configtypes.Int.from_py 2017-07-04 14:42:56 +02:00
Florian Bruhin
4e729bb9ec Back to using json in test_configtypes
It returns one-line data and is YAML compatible
2017-07-04 14:42:56 +02:00
Florian Bruhin
dfee857466 Make utils.yaml_dump return str 2017-07-04 14:42:56 +02:00
Florian Bruhin
05dc94ccc4 Improve configtypes tests 2017-07-04 14:42:56 +02:00
Florian Bruhin
7416164aca Rename old validate tests 2017-07-04 14:42:56 +02:00
Florian Bruhin
71f2e8c577 None validation fixups for test_configtypes 2017-07-04 14:42:56 +02:00
Florian Bruhin
61ba92ae18 configtypes: Separate str/py basic validation
This also ensures the behavior for none_ok is consistent.
2017-07-04 14:42:56 +02:00
Florian Bruhin
cdbd64a30d Move test_configtypes_hypothesis to test_configtypes 2017-07-04 14:42:56 +02:00
Florian Bruhin
7e7fbf106b Fix lint and old config options 2017-07-04 14:42:56 +02:00
Florian Bruhin
63bdee8b55 Initial configtype tests update 2017-07-04 14:42:56 +02:00
Florian Bruhin
1022b7ea32 Make jinja templating more strict
This ensures we actually know when an AttributeError happens.

It also changes most external code to use the correct environment, rather than
simply creating a jinja2.Template, which wouldn't use the more tightened
environment.
2017-07-02 22:17:33 +02:00
Florian Bruhin
aa6f229e6b Add utils.yaml_{load,dump} 2017-07-02 22:17:33 +02:00
Florian Bruhin
3e3685b68b Initial configexc refactoring 2017-07-02 22:17:33 +02:00
Florian Bruhin
5ec47da127 Get rid of configtypes.AutoSearch and IgnoreCase 2017-07-02 22:17:33 +02:00
Florian Bruhin
938946c48b configdata: Add check for shadowing keys 2017-07-02 22:17:33 +02:00
Florian Bruhin
52f6ea2525 Initial parsing 2017-07-02 22:17:33 +02:00
Florian Bruhin
cb5cd1a910 Remove old test_commands.py 2017-06-20 15:20:32 +02:00
Florian Bruhin
994e8c692f Merge different FakeTabbedBrowser objects 2017-06-20 15:19:53 +02:00
Florian Bruhin
750ef834dc Make PyOpenGL a required dependency
Looks like the "black screen" issue isn't the only thing going wrong, some
people even report segfaults since the vendor check was added.
2017-06-20 13:05:53 +02:00
Florian Bruhin
df0bd23d79 Make pylint shut up about test_version 2017-06-19 13:42:19 +02:00
Florian Bruhin
4ae8e247d0 Show 'legacy QtWebKit' in version output 2017-06-19 10:24:33 +02:00
Florian Bruhin
df6c4c6e73 Fix earlyinit.qt_version issues 2017-06-19 09:42:49 +02:00
Florian Bruhin
fdba676933 Move version.qt_version() to earlyinit
Importing version in earlyinit is a bad idea, as it already pulls in a lot of
stuff we don't want.
2017-06-19 08:57:29 +02:00
Florian Bruhin
8df0b063be Get rid of utils.unused because it's unused 2017-06-06 17:04:21 +02:00
Florian Bruhin
6d175fbb4b Get rid of configtypes.WebKitBytes 2017-06-06 16:17:44 +02:00
Florian Bruhin
27ea9a6954 Fix test_debug_trace 2017-06-05 20:17:39 +02:00
Florian Bruhin
eac284d880 Skip test_opengl_vendor without QtOpenGL
The test fails on Ubuntu Xenial because QtOpenGL is not installed.
This isn't a problem with real-life usage though, as we only call it with
QtWebEngine, and that ensures that QtOpenGL is available.
2017-05-31 10:29:46 +02:00
Florian Bruhin
912cea6e7d Improve version.opengl_vendor()
On Windows with OpenGL ES we can't use versionFunctions, so we just return None
early.

Also, this fixes some lint and adds a smoke test.
2017-05-30 19:23:27 +02:00
Florian Bruhin
4cb82af11e Add QUTE_FAKE_OS_RELEASE envvar 2017-05-30 07:37:10 +02:00
Florian Bruhin
7186dcb98f Send crash reports to private pastebin
Fixes #481
2017-05-29 09:20:10 +02:00
Florian Bruhin
0f3a17ae88 Fix raw string prefix 2017-05-23 10:09:06 +02:00
Florian Bruhin
ea2fbc427a tests: Use match= for pytest.raises 2017-05-23 09:36:00 +02:00
Florian Bruhin
af7923de4d tests: Use pytest.param 2017-05-23 08:08:46 +02:00
Florian Bruhin
c32c01ffc0 Merge commit '419793c0b9ff4f293babea7623dcaf4787bbaa35' 2017-05-22 07:55:44 +02:00
Florian Bruhin
aa8e6c8d17 Add parsed distribution to version info
Fixes #2369
2017-05-20 23:26:00 +02:00
Florian Bruhin
fe145b66c1 Add a version.distribution()
See #2369
2017-05-20 23:26:00 +02:00
Florian Bruhin
964b06bf7e Fix shadowed import 2017-05-19 09:26:48 +02:00
Florian Bruhin
f66c1a0e44 Merge commit '3d9729839d6d9b5ee5d38afdf6ddf410dfca2027' into abbradar/pac-fix 2017-05-19 08:36:39 +02:00