Commit Graph

15149 Commits

Author SHA1 Message Date
Florian Bruhin
05017c83d6 Add more config tests 2018-02-20 12:30:34 +01:00
Florian Bruhin
d511c5436d Remove dead config code 2018-02-20 12:30:34 +01:00
Florian Bruhin
36f3e54e1d Finish configutils tests 2018-02-20 12:30:34 +01:00
Florian Bruhin
19c00ff92a configutils: Clean up comments 2018-02-20 12:30:34 +01:00
Florian Bruhin
63c77a4d76 urlmatch: Fix equality with non-UrlPattern types 2018-02-20 12:30:34 +01:00
Florian Bruhin
685e3ffcfe Fix and test UrlPattern/configutils.Values stringification 2018-02-20 12:30:34 +01:00
Florian Bruhin
145a21449b configutils: Add first tests 2018-02-20 12:30:34 +01:00
Florian Bruhin
50c847562f configutils.Values: Make it possible to pass values 2018-02-20 12:30:34 +01:00
Florian Bruhin
ab02fcb116 configutils.Values: Add __repr__ 2018-02-20 12:30:34 +01:00
Florian Bruhin
316b4b5340 Add new files to PERFECT_FILES 2018-02-20 12:30:34 +01:00
Florian Bruhin
7fcb21573d Update backers file 2018-02-20 08:52:16 +01:00
Florian Bruhin
5978b7b35f config: Improve tests for non-existent options 2018-02-19 22:09:54 +01:00
Florian Bruhin
463320b599 Make test_config.py work 2018-02-19 22:09:54 +01:00
Florian Bruhin
1ada821092 Make sure config options exist 2018-02-19 22:09:54 +01:00
Florian Bruhin
cea664e396 Don't emit changed in unset if unneeded 2018-02-19 22:09:54 +01:00
Florian Bruhin
fecebd6ced Start getting test_config.py to run 2018-02-19 22:09:49 +01:00
Florian Bruhin
7d80825853 Fix test_configfiles.py 2018-02-19 22:09:46 +01:00
Florian Bruhin
ab119975e7 Only emit changed in unset if there was a change 2018-02-19 22:09:46 +01:00
Florian Bruhin
8fead148e2 Add FIXME 2018-02-19 22:09:46 +01:00
Florian Bruhin
1409f4e564 Fix migration of tabs.persist_mode_on_change 2018-02-19 22:09:46 +01:00
Florian Bruhin
5d63dfb24c Start fixing test_configfiles.py 2018-02-19 22:09:46 +01:00
Florian Bruhin
19148a4593 Fix :config-unset 2018-02-19 22:09:46 +01:00
Florian Bruhin
615c6ffe5a Make :config-write-py work again 2018-02-19 22:09:46 +01:00
Florian Bruhin
0f907b1a77 Fix getting YAML values in test_configcommands.py 2018-02-19 22:09:46 +01:00
Florian Bruhin
75181e16fa Fix test_models.py
The Config object got initialized via the config_stub fixture early, so we need
to force it to re-init its values after patching configdata.DATA.
2018-02-19 22:09:46 +01:00
Florian Bruhin
19f7b92abb Fix test_configinit.py 2018-02-19 22:09:43 +01:00
Florian Bruhin
c89e804653 Fix handling of invalid types in YamlConfig 2018-02-19 22:08:42 +01:00
Florian Bruhin
87e329aee3 Fix config.dump_userconfig() with defaults 2018-02-19 22:08:42 +01:00
Florian Bruhin
5eeb223338 Use a different directory for file prompt tests
This way they aren't influenced by the config_tmpdir fixture.
2018-02-19 22:08:42 +01:00
Florian Bruhin
f43c7fa360 Fix changing values in configutils.Values 2018-02-19 22:08:42 +01:00
Florian Bruhin
d3e8d46593 Use a real YamlConfig for tests 2018-02-19 22:08:42 +01:00
Florian Bruhin
cb631d532a Fix getting global value from configutils.Values 2018-02-19 22:08:42 +01:00
Florian Bruhin
8b666d2d2e Try to update settings in acceptNavigationRequest
This still doesn't seem to update them early enough?
2018-02-19 22:08:42 +01:00
Florian Bruhin
bd6e99158e Get rid of the second deepcopy for config values
There were two reasons why we deepcopy mutable objects in the config:

1) So mutations don't mess with our internal/default values.
2) So we can detect mutations and update the config.

If we're going to copy the value for 1) in maybe_copy(), we know the original
value is not going to be mutated, so we can use that directly for self._mutables
instead of making another copy.
2018-02-19 22:07:53 +01:00
Florian Bruhin
93972ff3f1 Copy value before watching it for mutations in config
If we copy it afterwards, we are going to mutate the copied object.
2018-02-19 22:07:53 +01:00
Florian Bruhin
ddb914dc65 Refactor YAML init 2018-02-19 22:07:53 +01:00
Florian Bruhin
8504ad6ff3 Change how iterating over Config/YamlConfig works 2018-02-19 22:07:53 +01:00
Florian Bruhin
6abb42a066 Make saving in autoconfig.yml work 2018-02-19 22:07:53 +01:00
Florian Bruhin
4691753965 Avoid running change handlers on config.clear 2018-02-19 22:07:53 +01:00
Florian Bruhin
9c670e13ce Make clearing config work 2018-02-19 22:07:53 +01:00
Florian Bruhin
a6b979539d Add missing configutils.py 2018-02-19 22:07:53 +01:00
Florian Bruhin
14a69d9047 Fix lint 2018-02-19 22:07:53 +01:00
Florian Bruhin
7c1fb1d215 Refactor acceptNavigationRequest handling to use signals 2018-02-19 22:07:53 +01:00
Florian Bruhin
2a7998847f Unset values properly 2018-02-19 22:07:53 +01:00
Florian Bruhin
74a7676111 Fix issues with per-domain proof-of-concept 2018-02-19 22:07:53 +01:00
Florian Bruhin
d09afdf0ee Refactor handling of mutables with url/pattern in Config
This also should not copy stuff coming from the config if it's not needed.
2018-02-19 22:07:53 +01:00
Florian Bruhin
8551288efb Start working on different per-URL storage 2018-02-19 22:07:53 +01:00
Florian Bruhin
5e50824042 Broken per-URL proof-of-concept 2018-02-19 22:07:53 +01:00
Florian Bruhin
4ed07d6062 Initial implementation of per-URL setting storage 2018-02-19 22:07:53 +01:00
Florian Bruhin
894da598d6 urlmatch: Remove dead code 2018-02-19 22:07:53 +01:00