Commit Graph

165 Commits

Author SHA1 Message Date
Florian Bruhin
1d7c2b6b82 Don't set TMPDIR for test_legacy.
This has no real benefit and seems to break tests with some platforms.
2015-09-09 19:31:52 +02:00
Florian Bruhin
011b571336 Use a shorter tempdir. 2015-09-09 19:31:52 +02:00
Florian Bruhin
b135569d5c ipc: Add workaround for NameError w/ SocketOptions. 2015-09-09 19:31:52 +02:00
Florian Bruhin
69e735c42e ipc: Add username to hash instead. 2015-09-09 19:31:52 +02:00
Florian Bruhin
34bd000442 Use shorter names.
The typical test path for a legacy FIFO was something like:

    /tmp/pytest-92/test_correct_socket_name0/qutebrowser_test/qutebrowser-ipc-dfc627b5be8602ea0e9cd258b73c0bc3

This is probably too long for a Unix local domain socket (104 chars max).
2015-09-09 19:31:52 +02:00
Florian Bruhin
4daa7e6979 Don't add username to FIFO name on Linux.
The runtime directory already has a qutebrowser subdir.
2015-09-09 19:31:52 +02:00
Florian Bruhin
3573b57130 Set socket permissions correctly. 2015-09-09 19:31:52 +02:00
Florian Bruhin
78cb0eaf85 More work on #888 (new IPC path).
First trying the legacy path and then using the new one works fine now, but the
permissions are still wrong.
2015-09-09 19:31:52 +02:00
Florian Bruhin
a4bc4ad478 Only log a single message in utils.error.
This helps with seeing the full message with logfail.
2015-09-09 19:31:52 +02:00
Florian Bruhin
6a0994038e Start working on #888 (new IPC path). 2015-09-06 19:50:22 +02:00
Florian Bruhin
bfd8faafef Add a protocol version to IPC.
Fixes #909.
2015-09-06 18:43:24 +02:00
Florian Bruhin
b95fd2c814 Test raw json data for IPC. 2015-09-06 18:06:23 +02:00
Florian Bruhin
bf9a897ce8 Skip some more IPC tests on Windows. 2015-09-06 16:42:44 +02:00
Florian Bruhin
9521da3c73 Fix error output with --no-err-windows. 2015-09-04 08:04:18 +02:00
Florian Bruhin
ea0cbea1dd ipc: Use a custom class for exceptions. 2015-09-04 07:12:23 +02:00
Florian Bruhin
2a4cd02704 100% coverage for misc.ipc. 2015-09-04 06:58:46 +02:00
Florian Bruhin
f77bdb7aec Adjust test_ipcserver_socket_none for prev commit. 2015-09-03 23:38:33 +02:00
Florian Bruhin
b40fb4dd43 ipc: Handle None-socket in slots correctly. 2015-09-03 20:48:51 +02:00
Florian Bruhin
27ee09a7a1 ipc: Skip test_normal on Windows. 2015-09-03 14:35:27 +02:00
Florian Bruhin
2f92ea92d8 test_ipc: Remove disconnect assert. 2015-09-03 11:55:21 +02:00
Florian Bruhin
f682477960 Fix some more IPC tests on Windows. 2015-09-03 11:55:17 +02:00
Florian Bruhin
46b28387db Rewrite test_double_connection.
This caused various problems in the old form.
2015-09-03 06:38:35 +02:00
Florian Bruhin
efe40fa7e0 Try different workaround for test_ipc issues. 2015-09-03 06:12:36 +02:00
Florian Bruhin
154c380fd0 Fix pylint in test_ipc. 2015-09-02 23:32:06 +02:00
Florian Bruhin
d966720900 ipc tests: More tests. 2015-09-02 23:32:06 +02:00
Florian Bruhin
b4c90c5db4 ipc tests: Clean up qlocalsocket correctly.
If we don't do this, on_error will be invoked with old sockets, when
self._socket is None...
2015-09-02 23:32:06 +02:00
Florian Bruhin
6468e60a36 ipc tests: Fix waiting for FakeSocket. 2015-09-02 23:32:06 +02:00
Florian Bruhin
a63f0d5409 More IPC tests. 2015-09-02 23:32:06 +02:00
Florian Bruhin
38ebd806cc Add some tests for misc.ipc. 2015-09-02 23:32:06 +02:00
Florian Bruhin
0c3ee46fe0 Merge branch 'autoupdate_tests' of https://github.com/acogneau/qutebrowser into acogneau-autoupdate_tests 2015-09-01 08:48:52 +02:00
Alexander Cogneau
2d12c26e8c Add extra url assertion for autoupdate 2015-09-01 01:06:11 +02:00
Alexander Cogneau
8ab85d6246 small edits to autoupdate test 2015-08-31 09:30:16 +02:00
Alexander Cogneau
ee77951e66 PEP8 fixes 2015-08-31 01:25:42 +02:00
Alexander Cogneau
e499d8932f 100% misc.autoupdate coverage 2015-08-31 01:10:04 +02:00
Florian Bruhin
ed9a29fb9a test_cmdhistory: Remove patching for prev/nextitem. 2015-08-27 06:40:14 +02:00
Florian Bruhin
3fac246744 test_cmdhistory: Add test for __getitem__. 2015-08-27 06:38:41 +02:00
Florian Bruhin
4a48ef2573 Add my copyright. 2015-08-27 06:30:54 +02:00
Florian Bruhin
38c5abfc98 Remove unneeded self-parameter. 2015-08-27 06:30:12 +02:00
Florian Bruhin
66700e9a94 Remove exception string checks. 2015-08-27 06:28:26 +02:00
Florian Bruhin
4544c78395 Remove unneeded comments/monkeypatching. 2015-08-27 06:25:10 +02:00
Florian Bruhin
4fb3114af8 Merge branch 'cmdhistory_tests' of git://github.com/acogneau/qutebrowser into acogneau-cmdhistory_tests 2015-08-27 06:18:30 +02:00
Florian Bruhin
3e255eae64 Skip some tests when frozen. 2015-08-26 20:29:56 +02:00
Alexander Cogneau
fd6e0559a6 remove unnecessary function 2015-08-26 12:10:25 +02:00
Alexander Cogneau
3a4069667a Remove test functions out of class 2015-08-26 12:07:47 +02:00
Florian Bruhin
8ffe591f98 Skip TestSave.test_long_output on Windows.
This seems to segfault unpredictably when exiting pytest and I can't find out
why.

Fixes #895.
2015-08-26 10:06:49 +02:00
Alexander Cogneau
9ef9224c32 Remove unecessary class 2015-08-26 00:20:14 +02:00
Alexander Cogneau
a1dff7d535 Final cmdhistory tests 2015-08-26 00:16:18 +02:00
Alexander Cogneau
18d42d1f0a More tests for cmdhistory 2015-08-25 22:17:42 +02:00
Florian Bruhin
11f4fbc772 Silence pylint. 2015-08-25 21:24:58 +02:00
Alexander Cogneau
26058f4e80 A few cmdhistory tests 2015-08-25 18:46:49 +02:00
Florian Bruhin
987b39885a sessions: Add more tests. 2015-08-25 17:49:45 +02:00
Florian Bruhin
a8d549cb24 sessions: Add some more tests. 2015-08-24 17:12:20 +02:00
Florian Bruhin
f79e2c92a4 Read back session test data as UTF-8. 2015-08-24 08:44:41 +02:00
Florian Bruhin
9d601e8eb9 Fix session tests. 2015-08-24 08:31:11 +02:00
Florian Bruhin
e7a52a0833 Add some tests for misc.sessions. 2015-08-24 08:00:32 +02:00
Florian Bruhin
3d4fd2652b test_editor: Skip un{read,writ}able on Windows.
Windows doesn't really have working file permissions...
2015-08-19 10:18:55 +02:00
Florian Bruhin
086c6c81a1 Simplify message_mock usage and assert more things. 2015-08-19 09:44:31 +02:00
Florian Bruhin
685bbaae6d 100% test coverage for misc.editor. 2015-08-19 09:34:44 +02:00
Florian Bruhin
aa367fa004 Simplify test_editor. 2015-08-19 09:09:09 +02:00
Florian Bruhin
acfdf8b956 Fix lint. 2015-08-19 07:57:47 +02:00
Florian Bruhin
aca082ce83 100% test coverage for misc.guiprocess. 2015-08-19 07:57:02 +02:00
Florian Bruhin
4efa022528 Fix test_checkpyver on Pythons without Tkinter. 2015-08-19 07:12:04 +02:00
Florian Bruhin
1a61e53daa 100% test coverage for misc.checkpyver. 2015-08-19 05:58:52 +02:00
Florian Bruhin
e4a0f1972f tests: Improve MessageMock and use it. 2015-08-18 21:38:18 +02:00
Florian Bruhin
2c5269acd6 Reorganize tests directory. 2015-08-18 20:19:02 +02:00