Florian Bruhin
a458615030
Further simplify caplog.messages
2018-10-25 11:16:26 +02:00
Florian Bruhin
3b8964183e
Use caplog.messages
2018-10-24 10:57:17 +02:00
Florian Bruhin
77c53707ac
Add missing str()
2018-10-24 10:57:17 +02:00
Florian Bruhin
41303ecfcf
Make sure temporary dir exists
...
This seems to be enforced with Qt 5.12
See #4025
2018-07-02 22:32:59 +02:00
Florian Bruhin
219b75524b
Fix TestCreatingDir on non-Linux
2018-02-10 23:08:47 +01:00
Florian Bruhin
5f62c016cc
Fix test_standarddir.TestCreatingDir
...
What we actually want to test here is that the given type directory is created
and has the correct permission, we don't care much about the basedir itself.
Also, the download dir is not created automatically.
This test failed on Python 3.7 because intermediate directories now aren't
created with the given mode anymore:
https://bugs.python.org/issue19930
https://docs.python.org/3.7/whatsnew/3.7.html#changes-in-the-python-api
2018-02-10 20:07:27 +01:00
Florian Bruhin
6f028e9ad0
Update copyright years
2018-02-05 12:19:50 +01:00
Florian Bruhin
430126dcc8
pylint: Re-enable ungrouped-imports
2017-12-15 23:08:53 +01:00
Gyorgy Orban
bb54a954fe
use subprocess run
...
The usage of subprocess.run is recommended since python 3.5.
Popen, check_call, call and check_output calls were replaced with run.
2017-11-01 09:59:32 +01:00
Florian Bruhin
33df4eb865
Skip test_fake_haiku on Windows
2017-10-21 19:01:22 +02:00
Florian Bruhin
9dc9bcaf39
Make standarddir work on HaikuOS
...
For some reason, it returns an empty DataLocation.
2017-10-17 22:37:14 +02:00
Florian Bruhin
4e46c34e5a
Use .assert_not_called() for mocks
2017-09-22 19:58:38 +02:00
Florian Bruhin
1d964ccdaf
Only run system datadir test on Linux
2017-09-20 12:20:46 +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
Florian Bruhin
3a5241b642
Start using attrs
...
Closes #1073
2017-09-19 22:21:45 +02:00
Florian Bruhin
852baaa8c3
Drop support for Qt < 5.7.1
...
See #2742
2017-09-18 23:01:17 +02:00
Florian Bruhin
70b8585e95
Move qtutils.unset_organization to standarddir
2017-09-17 20:44:08 +02:00
Florian Bruhin
f29bafcdb2
Fix expected dir on macOS
2017-09-17 10:35:05 +02:00
Florian Bruhin
7ed64efa08
Fix standarddir.cache() on Windows
2017-09-17 10:35:05 +02:00
Florian Bruhin
b31db0d0d5
Add another str() for paths
...
Using py.path for os.path is only supported since 3.6
2017-09-17 09:49:06 +02:00
Florian Bruhin
df9726a152
Fix standarddir without AppDataLocation
2017-09-17 09:49:06 +02:00
Florian Bruhin
9354297276
Add test for standarddir without QApplication
...
See #2791 .
2017-09-16 23:48:06 +02:00
Florian Bruhin
9706dcbda5
Fix lint
2017-09-16 23:48:02 +02:00
Florian Bruhin
a1fa40f067
Remove the ability to migrate old QtWebEngine data
...
Versions before v0.9.0 (which didn't even support hinting with QtWebEngine!)
used to write QtWebEngine data to:
~/.local/share/qutebrowser/qutebrowser/QtWebEngine/Default
~/.cache/qutebrowser/qutebrowser/QtWebEngine/Default
In v0.9.0 this was changed to:
~/.local/share/qutebrowser/webengine
~/.cache/qutebrowser/webengine
Now we don't try to migrate data from the old location anymore.
2017-09-16 23:48:02 +02:00
Florian Bruhin
a85e19a5e1
Add initial support for early standarddir init
...
See #2589 , #2791
2017-09-16 23:47:22 +02:00
Florian Bruhin
9f955f251a
Reshape comments
2017-09-15 14:11:45 +02:00
Florian Bruhin
12260e068a
Don't move cache directory on Windows
2017-09-14 13:35:42 +02:00
Florian Bruhin
0de7b2eb83
Skip standarddir migrations when a basedir is given
2017-09-14 00:37:54 +02:00
Florian Bruhin
3dc67df180
Fix minor standarddir migration issues
2017-09-14 00:37:54 +02:00
Florian Bruhin
9d95dec5ea
Handle standarddir.config() correctly on macOS
...
With auto=False we should get ~/.qutebrowser
2017-09-13 21:32:36 +02:00
Florian Bruhin
70a9a7e5c8
Fix macOS testsuite issues
2017-09-13 21:32:36 +02:00
Florian Bruhin
231193f7a6
Fix standarddir test coverage
2017-09-13 21:32:36 +02:00
Florian Bruhin
2f394d3c9f
Mock out all moving functions for standarddir.init()
2017-09-13 21:32:36 +02:00
Florian Bruhin
50aab7a802
Skip tests needing AppDataLocation on older Qt versions
2017-09-13 21:32:22 +02:00
Florian Bruhin
f7d17c4c55
Allow existing empty dir when migrating files
...
Remove old empty directory if it exists - otherwise, we move old/data to
new/data/data.
2017-09-13 21:32:22 +02:00
Florian Bruhin
e84c1fa82f
Call _init_config in test_fake_mac_auto_config
2017-09-13 21:32:22 +02:00
Florian Bruhin
2a9441dfbf
Make moving data in standarddir more generic
2017-09-13 21:32:22 +02:00
Florian Bruhin
ad2598b475
Add initial support for standarddir.config(auto=True)
...
This doesn't actually migrate things yet.
See #2791 , #383 .
2017-09-13 17:26:56 +02:00
Florian Bruhin
a2f16dbecd
Merge standarddir.system_data() into standarddir.data(system=True)
...
See #2791
2017-09-13 17:26:56 +02:00
Florian Bruhin
2d500d4efa
Also don't create ~/Downloads in standarddir.downloads()
...
This means we need to create it in downloads.py instead.
Fixes #2418
2017-09-13 17:26:56 +02:00
Florian Bruhin
b185e57406
Remove change_qapp_name in test_standarddir
...
This is already done in conftest.py anyways
2017-09-13 17:26:56 +02:00
Florian Bruhin
56bbd73622
Introduce standarddir caching
...
This makes things a bit more complicated, but is needed to make standarddir (and
thus the config) work without a QApplication.
2017-09-13 17:26:56 +02:00
Florian Bruhin
ad615941a2
Replace OS X with macOS
2017-07-08 11:12:43 +02:00
Florian Bruhin
af7923de4d
tests: Use pytest.param
2017-05-23 08:08:46 +02:00
Florian Bruhin
822623f2ed
Finally update copyrights...
2017-05-09 21:37:03 +02:00
Florian Bruhin
ca4f249c30
Use three-argument form of monkeypatch.*attr
2017-03-01 11:33:41 +01:00
Florian Bruhin
de50f30b9b
Replace all GitHub links
2017-02-05 00:13:11 +01:00
Florian Bruhin
3ca4916b76
Relax qt_log_ignore pattern
...
Earlier Qt versions show this:
QStandardPaths: wrong ownership on runtime directory
/tmp/pytest-of-user/pytest-0/test_linux_invalid_runtimedir0/does-not-exist,
-2 instead of 1000
2016-11-24 10:37:56 +01:00
Florian Bruhin
64b47fc3a2
Handle an invalid $XDG_RUNTIME_DIR gracefully
...
This is probably against the XDG basedir spec, but some people have a
Linux without anything setting $XDG_RUNTIME_DIR correctly.
Fixes #971 .
2016-11-24 10:14:02 +01:00