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
9d9372c6a8
Add standarddir.temp().
2015-09-09 19:31:52 +02:00
Florian Bruhin
b0c2021eca
Revert "logfail: Update tests to use testdir."
...
This reverts commit f7e40f73ab
.
Conflicts:
tests/helpers/test_logfail.py
2015-09-09 08:49:51 +02:00
Florian Bruhin
2f8b39df1c
Revert "logfail: Switch tests to subprocess pytest runs."
...
This reverts commit 09c265ddb0
.
2015-09-09 08:49:17 +02:00
Florian Bruhin
f7c405d2f4
Revert "logfail: Continue running test and fail afterwards."
...
This reverts commit 66ed4e9c4e
.
2015-09-09 08:49:06 +02:00
Florian Bruhin
909cafb516
Fix lint.
2015-09-09 07:58:14 +02:00
Florian Bruhin
66ed4e9c4e
logfail: Continue running test and fail afterwards.
2015-09-09 07:58:14 +02:00
Florian Bruhin
09c265ddb0
logfail: Switch tests to subprocess pytest runs.
...
It seems they're much more reliable this way.
2015-09-09 07:58:14 +02:00
Florian Bruhin
f7e40f73ab
logfail: Update tests to use testdir.
...
This makes more sophisticated tests easier.
2015-09-09 07:58:14 +02:00
Florian Bruhin
f5d9e967ef
logfail: Rename capturelog module.
...
When trying to use this as conftest for the updated tests, pytest_* would be
interpreted as hook otherwise.
2015-09-09 07:58:14 +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
02a539f2d7
Rename TestError to Error.
2015-09-06 16:43:23 +02:00
Florian Bruhin
bf9a897ce8
Skip some more IPC tests on Windows.
2015-09-06 16:42:44 +02:00
Alexander Cogneau
851bf4cd31
Fix pylint
2015-09-06 16:13:41 +02:00
Alexander Cogneau
6541a360b1
Final cooikies tests
2015-09-06 00:24:38 +02:00
Alexander Cogneau
d36c701b07
Fixed comments
2015-09-04 11:44:59 +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
Alexander Cogneau
418328e61b
Cookie tests done
2015-09-03 18:17:39 +02:00
Alexander Cogneau
96e3a0b1f1
first cookie tests
2015-09-03 17:24:01 +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
ab9c046d54
Adjust default keybinding to clear-keychain on Esc.
...
Fixes #917 .
2015-09-03 11:14:05 +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
18af0b4b35
tests: Make FakeSignal callable.
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
0b911d2e20
Split integration tests, run smoke via pytest.
2015-09-01 08:54:53 +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
Florian Bruhin
8ea91b5bbc
Fix cookiejar_and_cache move.
2015-08-31 08:00:21 +02:00
Florian Bruhin
03f4d738ab
Rename klass fixture to klass_fixt.
...
See https://github.com/pytest-dev/pytest/issues/979 .
2015-08-31 07:42:53 +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
79c1867e6c
Don't save cookies when starting in private mode.
...
Whoops... :(
Fixes #903 .
2015-08-30 23:17:48 +02:00
Florian Bruhin
6df00f8266
Move cookiejar_and_cache fixture to conftest.py.
2015-08-30 23:11:23 +02:00
Florian Bruhin
0cd265296e
Add tests/html/jsalert_multiline.html.
2015-08-27 22:13:40 +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
182dd26fb7
Refactor test_basekeyparser.
2015-08-26 23:02:23 +02:00
Florian Bruhin
1f26b3090c
tests: Add _debug_log test for BaseKeyParser.
2015-08-26 20:38:29 +02:00
Florian Bruhin
3e255eae64
Skip some tests when frozen.
2015-08-26 20:29:56 +02:00
Florian Bruhin
cb0e92b4e8
Only run test_check_coverage.py on Linux.
2015-08-26 20:20:08 +02:00
Florian Bruhin
2750c6ab5a
Make check_coverage.py more testable and add tests.
2015-08-26 20:08:40 +02:00
Florian Bruhin
4f1c27d230
Merge branch 'basekeyparser_tests' of git://github.com/acogneau/qutebrowser into acogneau-basekeyparser_tests
2015-08-26 17:34:10 +02:00
Alexander Cogneau
cd34fc4b57
Small changes to basekeyparser tests
2015-08-26 12:13:47 +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
d3488172ec
Lift duration for test_debug
2015-08-25 22:41:54 +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
Florian Bruhin
38a07cc152
Fix lint.
2015-08-25 21:21:49 +02:00
Florian Bruhin
8c76db3892
Add some tests for progressbar sizing in statusbar.
2015-08-25 21:07:35 +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
Alexander Cogneau
f54295f95c
Test _warn_on_keychains.
2015-08-25 16:28:02 +02:00
Alexander Cogneau
09161faca5
Refactor read_config for easier testing
2015-08-25 12:04:22 +02:00
Alexander Cogneau
05eb9bd08c
Remove unnecessary lines
2015-08-25 10:28:46 +02:00
Alexander Cogneau
1a227ae3a7
pytestqt is not required
2015-08-24 19:29:50 +02:00
Alexander Cogneau
af9647221a
Add tests for BaseKeyParser
2015-08-24 18:12:12 +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
8b40603562
Revert "Fix argparser test after win_registry change."
...
This reverts commit 70243d6e2f
.
2015-08-24 08:05:34 +02:00
Florian Bruhin
e7a52a0833
Add some tests for misc.sessions.
2015-08-24 08:00:32 +02:00
Florian Bruhin
4f250ba5d7
tests: Allow tests to add windows to win_registry.
2015-08-24 08:00:16 +02:00
Florian Bruhin
70243d6e2f
Fix argparser test after win_registry change.
...
The last focused window was now window 1 - so we better make this explicit.
2015-08-23 22:37:27 +02:00
Florian Bruhin
7bc5996d52
tests: Provide activeWindow() in FakeQApplication.
2015-08-23 21:55:25 +02:00
Florian Bruhin
9ff97d31da
tests: Provide two windows in win_registry fixture.
2015-08-23 21:55:12 +02:00
Florian Bruhin
2556e2e27b
Remove unused import.
2015-08-23 18:29:02 +02:00
Florian Bruhin
0907d8bf76
tests: Add a webview fixture.
2015-08-23 18:17:22 +02:00
Florian Bruhin
6d8854bc07
Simplify usage of tabhistory.TabHistoryItem.
2015-08-23 18:16:19 +02:00
Alexander Cogneau
193a8d5242
Add unit tests for KeyInput.BaseKeyParser
2015-08-22 23:26:13 +02:00
Florian Bruhin
543053c8f5
test_signalfilter: Remove unused fixture.
2015-08-20 07:14:32 +02:00
Florian Bruhin
7ee4d2f2c9
100% test coverage for commands.argparser.
2015-08-20 07:14:25 +02:00
Florian Bruhin
774ef58432
Use qapp fixture in enable_caret_browsing.
...
This fixes a segfault when only running test_position_caret.
2015-08-19 21:40:13 +02:00
Florian Bruhin
1a1bc4b8a8
Fix lint.
2015-08-19 21:13:35 +02:00
Florian Bruhin
a79c139aa4
Revert "style: Check for QColor when setting in ColorDict."
...
This reverts commit 9b82fae6fb
.
2015-08-19 20:48:19 +02:00
Florian Bruhin
5a975d1b90
100% test coverage for config.style.
2015-08-19 20:43:06 +02:00
Florian Bruhin
b11e075047
Add __getitem__ to ConfigStub.
2015-08-19 20:39:48 +02:00
Florian Bruhin
1ddd65304a
tests: Use a real signal for ConfigStub.
2015-08-19 19:37:19 +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
6d1b0ba260
Clean up conftest.py.
2015-08-18 20:43:42 +02:00
Florian Bruhin
2c5269acd6
Reorganize tests directory.
2015-08-18 20:19:02 +02:00
Florian Bruhin
d8734a668c
Add workaround for pytest-capturelog bug.
...
This should fix the tests on Windows.
See https://bitbucket.org/memedough/pytest-capturelog/issues/7/
2015-08-18 08:06:41 +02:00
Florian Bruhin
1e08a6a202
Fix message box tests on OS X.
...
From the QMessageBox::setWindowTitle docs:
On Mac OS X, the window title is ignored (as required by the Mac OS X
Guidelines).
2015-08-17 23:37:55 +02:00
Florian Bruhin
5d013a67a7
100% coverage for misc.msgbox.
2015-08-17 23:18:52 +02:00
Florian Bruhin
9892c10f49
100% test coverage for utils.error.
2015-08-17 23:18:39 +02:00
Florian Bruhin
9cd2f6ba24
100% test coverage for commands.cmdutils.
2015-08-17 21:13:13 +02:00
Florian Bruhin
00d81a74c2
100% coverage for browser.network.networkreply.
2015-08-17 07:16:33 +02:00
Florian Bruhin
e909b1f36d
Fix lint.
2015-08-16 23:20:30 +02:00
Florian Bruhin
dff4c37f54
100% test coverage for browser/signalfilter.py.
2015-08-16 23:16:13 +02:00
Florian Bruhin
75fd97f74f
Skip command test.
2015-08-16 22:51:00 +02:00
Florian Bruhin
6656e6aa9b
Merge branch 'command-tests'
2015-08-16 22:48:07 +02:00
Florian Bruhin
8655ebc9c8
Ignore "load glyph failed" message in JS test.
2015-08-16 22:00:21 +02:00
Florian Bruhin
044a63d4a4
Skip all GUIProcess tests on Windows.
2015-08-16 21:46:36 +02:00
Florian Bruhin
d94c1736db
Use a proper file:// URL for dirbrowser icons.
2015-08-16 19:04:54 +02:00
Florian Bruhin
a6c104f0ef
Fix TestFileSchemeHandler.test_dir on Windows.
2015-08-16 18:28:46 +02:00
Florian Bruhin
2a0dd341de
Move test_filescheme.py.
2015-08-16 18:27:26 +02:00
Antoni Boucher
abeb7e3390
Fixed issues.
2015-08-13 19:54:23 -04:00
Florian Bruhin
b3df642b21
Write more tests for dirbrowser.
2015-08-13 21:56:22 +02:00
Antoni Boucher
77190554cc
Merge branch 'master' into feature/directory-browser
2015-08-12 16:57:45 -04:00
Florian Bruhin
591a5b8c56
Revert "Add a workaround for pytest-html surrogate issue."
...
This reverts commit 9c3c46f677
.
2015-08-12 18:27:41 +02:00
Florian Bruhin
6f4141956b
Merge branch 'dynamic-column-widths' of git://github.com/acogneau/qutebrowser into acogneau-dynamic-column-widths
2015-08-12 18:20:01 +02:00
Alexander Cogneau
5a0b160736
Remove whitespace
2015-08-12 11:02:41 +02:00
Alexander Cogneau
61a6b196e9
Parametrization for completion tests
2015-08-12 09:08:04 +02:00
Florian Bruhin
25b43d528c
Clear textbase text properly.
2015-08-12 07:41:06 +02:00
Florian Bruhin
5a1663c584
100% coverage for mainwindow.statusbar.textbase.
2015-08-12 07:40:45 +02:00
Florian Bruhin
c1484553c1
Remove unused import.
2015-08-12 07:07:28 +02:00
Florian Bruhin
927cf84e14
100% test coverage for config.textwrapper.
2015-08-12 07:01:21 +02:00
Florian Bruhin
e47e131d41
Increase timeouts in test_timer.
...
Seems like Windows is too slow...
2015-08-12 06:53:34 +02:00
Florian Bruhin
a6d09b8cc9
100% coverage for browser.network.schemehandler.
2015-08-12 06:53:32 +02:00
Florian Bruhin
da9cb88c81
pylint: Disable protected-access for tests.
2015-08-12 06:44:33 +02:00
Florian Bruhin
cf45d97046
100% test coverage for utils.jinja.
2015-08-12 06:25:05 +02:00
Florian Bruhin
15c5cf75cd
Reset standarddir args in TestConfigInit.
...
This caused test_transform_userstylesheet_base64 to fail.
2015-08-11 21:22:36 +02:00
Florian Bruhin
9c3c46f677
Add a workaround for pytest-html surrogate issue.
...
See https://github.com/davehunt/pytest-html/issues/12
2015-08-11 21:11:28 +02:00
Florian Bruhin
8351c6d951
Make TestFileAndUserStyleSheet use qapp fixture.
2015-08-11 20:16:19 +02:00
Florian Bruhin
88d92db6e4
Add tests for rel. inexistent File/UserStyleSheet.
2015-08-11 20:15:55 +02:00
Florian Bruhin
14545a3a22
Mark some tests as integration and no coverage.
2015-08-11 19:36:27 +02:00
Florian Bruhin
0f47ef17a5
Make test_get_all_objects_qapp work on Windows.
2015-08-11 19:29:30 +02:00
Florian Bruhin
68f80c602b
Remove unused import.
2015-08-11 19:23:29 +02:00
Florian Bruhin
55bf555bfb
Mark test_get_all_objects_qapp to use qapp.
2015-08-11 18:14:17 +02:00
Florian Bruhin
52ec9ed28f
Move get_all_objects() tests into a class.
2015-08-11 18:13:02 +02:00
Florian Bruhin
bf156cf554
Mock out QApplication.allWidgets.
...
This could return widgets which are still alive from previous tests, so it's
not reliable.
2015-08-11 18:08:11 +02:00
Florian Bruhin
5bd55cb38b
Fix lint.
2015-08-11 17:16:58 +02:00
Florian Bruhin
2d8aaecd65
100% coverage for utils.debug.
2015-08-11 17:11:00 +02:00
Alexander Cogneau
8be433f5f6
Add tests:
...
- sum of column widths equals 100
- column widths tuple has 3 elements
2015-08-11 09:17:46 +02:00
Florian Bruhin
7412e4f723
Reorganize utils.debug tests and add some more.
2015-08-11 07:41:25 +02:00
Florian Bruhin
dcaae51b4f
Remove unused imports.
2015-08-10 19:47:19 +02:00
Florian Bruhin
c8679d6544
100% coverage for browser.webelem.
2015-08-10 19:37:16 +02:00
Florian Bruhin
9cabd4828c
Skip test_guiprocess:test_error on Windows.
...
Waiting for a new pytest-qt release which will probably fix this.
2015-08-10 06:54:11 +02:00
Florian Bruhin
69f6822c82
Fix lint.
2015-08-09 23:09:48 +02:00
Florian Bruhin
2fe1bcfc2b
Skip GUI tests when no DISPLAY is available.
...
Fixes #851 .
2015-08-09 22:45:24 +02:00
Florian Bruhin
fbf53168c2
Skip test_double_start_finished on Windows.
...
It seems the process sometimes crashes...
2015-08-09 20:00:45 +02:00
Florian Bruhin
c4ebfcd4b3
Make tests fail on unexpected logging messages.
2015-08-09 20:00:36 +02:00
Florian Bruhin
fe3eb30892
Reorganize exceptions in urlutils.
...
- Instead of ValueError, a new InvalidUrlError is raised with invalid URLs.
- FuzzyUrlError got removed as it's basically the same as InvalidUrlError.
2015-08-09 18:48:32 +02:00
Antoni Boucher
4d2a55190f
Removed useless method.
2015-08-08 19:52:13 -04:00
Antoni Boucher
e5779d0775
Fixed tests.
2015-08-08 19:32:47 -04:00
Antoni Boucher
a6010e3ead
Renamed test function.
2015-08-08 15:40:18 -04:00
Antoni Boucher
14ae308279
Added a file:// scheme.
2015-08-08 15:16:48 -04:00
Antoni Boucher
2969599390
Use toLocalFile function instead of slicing.
2015-08-08 14:13:09 -04:00
Antoni Boucher
e6521b047d
Added get_file_list function and tests.
2015-08-08 14:10:27 -04:00
Antoni Boucher
b8809f879d
Added resource_filename function and tests.
2015-08-08 13:47:47 -04:00
Daniel
bb6d6e51f6
Remove trailing whitespace in test_urlutils.py
2015-08-08 13:59:43 +02:00
Daniel
72c65a812f
Move incdec_number tests to own class
...
and add tests for numbers in anchors
2015-08-08 13:47:17 +02:00
Daniel
9e98ab181a
Add URL validity check + tests to incdec_number
2015-08-08 00:57:16 +02:00
Daniel
c4c3a83ac0
rename url_incdec_number to incdec_number
2015-08-08 00:57:16 +02:00
Daniel
276b163e0d
Move logic from _navigate_incdec to urlutils
...
Also add unittests for url_incdec_number
2015-08-07 18:48:07 +02:00
Florian Bruhin
01f71e980d
pylint: Ignore import-error.
2015-08-07 00:16:37 +02:00
Florian Bruhin
8aab87e2a2
Don't readd capturelog handler after log tests.
...
I don't really know why, but doing that ends up with something calling
sys.stdout.close()...
Fixes #856 .
2015-08-07 00:09:02 +02:00
Florian Bruhin
aa1ea9b063
Use parametrization for TestKeyToString:test_all.
...
This generates a lot of tests, but is more stable than our current approach.
2015-08-06 23:43:53 +02:00
Florian Bruhin
5ccdec4162
Add comment about Qt warning.
2015-08-06 23:19:05 +02:00
Florian Bruhin
0a16f29bd1
Hexlify strings in TestJavascriptEscape.
2015-08-04 23:12:40 +02:00
Florian Bruhin
0ce9ae070c
Add some more test cases for TestJavascriptEscape.
2015-08-04 12:42:49 +02:00
Florian Bruhin
43266ac08a
webelem: Add more tests.
2015-08-03 23:40:39 +02:00
Florian Bruhin
c0941ab19b
Add more webelem tests.
2015-08-02 23:49:22 +02:00
Florian Bruhin
982a6eccfb
Rewrite tests/browser/test_webelem.py for pytest.
2015-08-02 22:16:03 +02:00
Florian Bruhin
e5056e1c43
100% coverage for mainwindow.statusbar.tabindex.
2015-08-02 20:34:37 +02:00
Florian Bruhin
2190316b27
Fix lint.
2015-08-02 20:16:28 +02:00
Florian Bruhin
f8f03ea99d
Small simplification in test_http_hypothesis.
2015-08-02 20:14:39 +02:00
Florian Bruhin
07641830ae
Add hypothesis tests for http/rfc6266.
...
See #830 .
2015-08-02 20:12:10 +02:00
Florian Bruhin
25d1064aee
Add some more rfc6266 tests.
2015-08-02 19:39:05 +02:00
Florian Bruhin
33915b65cf
Test getting path without Content-Disposition.
2015-08-02 17:19:20 +02:00
Florian Bruhin
359b886ba0
Small style fixes for test_content_disposition.
2015-08-02 14:07:28 +02:00
Florian Bruhin
b2cb9d6d46
Add hypothesis tests for misc.split.
...
See #830 .
2015-08-02 13:40:24 +02:00
Florian Bruhin
59460035c5
Add simple_split() test with maxsplit=0 and keep.
2015-08-02 13:20:30 +02:00
Florian Bruhin
9318173dc8
Test ShellLexer with empty input.
2015-08-02 13:02:32 +02:00
Florian Bruhin
dacf2cace2
Fix line length.
2015-08-02 01:57:16 +02:00
Florian Bruhin
49f017c0dd
Fix mainwindow.statusbar.percentage tests.
2015-08-02 01:53:30 +02:00
Florian Bruhin
fc09d63eb1
Fix lint.
2015-08-02 01:46:32 +02:00
Florian Bruhin
f21cffd9b8
100% coverage for mainwindow.statusbar.percentage.
2015-08-02 01:45:19 +02:00
Florian Bruhin
9db0e03f05
Add some tests for config.configexc.
2015-08-02 01:31:43 +02:00
Florian Bruhin
e94e90baec
Add some tests for config.configdata.
2015-08-02 00:59:13 +02:00
Florian Bruhin
26f6bb7d0d
Rewrite browser.test_tabhistory.py for pytest.
2015-08-02 00:34:04 +02:00
Florian Bruhin
0e25f5c730
Use a fake process for test_cmd_args.
...
This should fix the teardown exception (because the message module is not
patched anymore) with the new pytest-qt version.
2015-08-01 23:50:29 +02:00
Florian Bruhin
52d7a5693f
Fix lint.
2015-08-01 13:47:42 +02:00
Florian Bruhin
fa131e3290
Test urlutils.same_domain with invalid URLs.
2015-08-01 13:45:51 +02:00
Florian Bruhin
336b7de6d4
Clean up same_domain tests.
2015-08-01 13:23:03 +02:00
Florian Bruhin
27f65be860
Merge branch 'referer-header' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-referer-header
...
Conflicts:
tests/utils/test_urlutils.py
2015-08-01 12:44:57 +02:00
Florian Bruhin
451477593f
Always require 4 values for padding.
2015-08-01 00:34:09 +02:00
Florian Bruhin
452c4115d3
Add a Padding config type.
2015-07-31 15:38:41 +02:00
Florian Bruhin
c750ff3f50
configtypes: Handle invalid format syntax.
2015-07-26 13:56:46 +02:00
Florian Bruhin
4bdf00b148
configtypes: Handle {1} correctly.
2015-07-26 13:56:40 +02:00
Florian Bruhin
694fbe053d
Fix lint.
2015-07-24 18:11:52 +02:00
Florian Bruhin
44bf4ae883
configtypes: Fix ' ' value with Command.
2015-07-24 17:56:12 +02:00
Florian Bruhin
ebdfa0be73
Add hypothesis tests for configtypes.
...
See #830 .
2015-07-24 17:49:09 +02:00
Florian Bruhin
b19852b6e7
configtypes: Add _basic_validation() to BaseType.
...
This has a few implications:
- Checking for empty/none_ok is now easier as _basic_validation() does this.
- To make things easier, WebKitBytes and WebKitBytesList now need to have
none_ok passed as well instead of assuming True.
- _basic_validation() checks for unprintable chars and raises ValidationError
if they occur, so this gets checked for all types.
2015-07-24 17:39:02 +02:00
Florian Bruhin
dfba381b57
Fix broken utils.version test.
2015-07-24 13:53:26 +02:00
Florian Bruhin
5643b14987
configtypes: Add test for UserAgent.complete().
2015-07-24 00:29:12 +02:00
Florian Bruhin
cc6602926f
configtypes: Add tests for ConfirmQuit.
2015-07-24 00:24:17 +02:00
Florian Bruhin
b3755f4ca1
configtypes: Add tests for SessionName.
2015-07-24 00:11:52 +02:00
Florian Bruhin
e145d73852
configtypes: Add a MappingType base class.
2015-07-24 00:11:52 +02:00
Florian Bruhin
0b1704d829
configtypes: Add a __repr__ to ValidValues.
2015-07-24 00:11:52 +02:00
Florian Bruhin
8f48247b8f
configtypes: Add invalid URL for TestUrlList.
2015-07-24 00:11:52 +02:00
Florian Bruhin
71188bb67b
configtypes: Simplify UrlList tests.
2015-07-23 23:14:20 +02:00
Florian Bruhin
e4c7e70aba
configtypes: Fix ColorTests parametrization.
2015-07-23 21:33:16 +02:00
Florian Bruhin
fb6bf5c34f
configtypes: Change tests to not subclass.
2015-07-23 20:55:27 +02:00
Florian Bruhin
41333cd6e1
configtypes: Add some additional tests.
2015-07-23 16:58:21 +02:00
Florian Bruhin
eb28365d82
configtypes: Add os.path.join emulation to os_mock.
2015-07-23 16:57:42 +02:00
Florian Bruhin
cf5296ebb5
configtypes: Fix broken Command test.
2015-07-23 14:41:29 +02:00
Florian Bruhin
75991e1f87
configtypes: Add tests for BoolAsk.
2015-07-23 14:41:14 +02:00
Florian Bruhin
23583b7d48
Refactor test_configtypes for pytest.
2015-07-23 12:37:14 +02:00
Florian Bruhin
a02055414d
Make command tests work.
2015-07-20 11:23:34 +02:00
Florian Bruhin
e5843ffcf6
Command tests WIP
2015-07-19 21:56:23 +02:00
Florian Bruhin
ca5a78dfc7
Attach numerical code to Qt OSErrors and fix tests.
...
This fixes tests with tox < 2.0.0 on systems with a non-english locale, as it's
no longer the errorString which gets compared.
Fixes #806 .
2015-07-12 11:20:28 +02:00
Florian Bruhin
0037b0db7e
Actually run OS X tests on OS X.
2015-07-11 20:14:26 +02:00
Florian Bruhin
e010d3dabc
Fix os.path patching in tests.
...
Fixes #802 .
2015-07-06 18:50:34 +02:00
Florian Bruhin
20ff7e702a
Increase all test_guiprocess timeouts.
...
Windows is fscking slow...
2015-07-06 18:04:54 +02:00
Florian Bruhin
c5b75b0b16
Merge remote-tracking branch 'origin/usertypes-tests'
2015-07-06 17:58:13 +02:00
Florian Bruhin
382b52a0b8
Merge remote-tracking branch 'origin/urlutils-tests'
2015-07-06 17:58:06 +02:00
Florian Bruhin
cef350ad66
tests: Use multiple pytest.mark.parametrize calls.
2015-07-06 17:56:13 +02:00
Florian Bruhin
a0a7f9feda
Skip test_file_absolute_expanded on Windows.
2015-07-06 17:22:52 +02:00
Florian Bruhin
3f13c2bd3e
Add/improve tests for qutebrowser.utils.urlutils.
2015-07-06 17:10:57 +02:00
Florian Bruhin
aa1bf00274
Add tests for usertypes.Question.
2015-07-06 14:34:47 +02:00
Florian Bruhin
1533108ca6
Add tests for usertypes.Timer.
2015-07-02 21:10:56 +02:00
Florian Bruhin
b02867fe37
Improve enum tests.
2015-07-02 21:10:56 +02:00
Florian Bruhin
4e0d00098c
Improve NeighborList tests.
2015-07-02 21:10:56 +02:00
Florian Bruhin
1672399252
Remove unused imports.
2015-06-28 23:20:56 +02:00
Florian Bruhin
9b264c7514
tests: Share common markers.
2015-06-28 22:58:48 +02:00
Martin Tournoij
a346644c71
Changed:
...
- same_domain: If the tld is unknown, only return True if the hostnames are the same
- Fix when starting without an open page
2015-06-27 21:15:54 +02:00
Martin Tournoij
f806eefba6
Merge branch 'master' into referer-header
2015-06-27 20:43:54 +02:00
Florian Bruhin
6dbac1c047
Rewrite version.version() tests and test short arg.
2015-06-26 22:37:00 +02:00
Florian Bruhin
75b894a186
Include DESKTOP_SESSION in qute:version.
2015-06-24 20:54:37 +02:00
Florian Bruhin
220ac021f0
Print style name in version info.
2015-06-24 20:37:48 +02:00
Florian Bruhin
24424a0486
Fix expected qWarning messages for Qt 5.5.
2015-06-24 20:30:26 +02:00
Florian Bruhin
db267ae195
tests: Increase timeout for starting processes.
...
Windows can be slow...
2015-06-24 18:32:56 +02:00
Florian Bruhin
b7c3e7b959
Disallow {foo} in search engine URLs.
...
This causes an KeyError otherwise when trying to use str.format to insert the
search term.
2015-06-24 07:46:15 +02:00
Florian Bruhin
a5610fd6da
Fix TestReadFile when frozen.
2015-06-19 09:40:26 +02:00
Florian Bruhin
85f6b3c6df
Fix TestGitStr when frozen.
2015-06-19 09:40:26 +02:00
Florian Bruhin
08c8a5f7dd
Skip tests which need sys.executable when frozen.
...
See #770
2015-06-19 09:40:26 +02:00
Florian Bruhin
3de1299650
tests: Use utils.read_file to get javascript files.
...
This will make those tests pass when frozen.
See #770 .
2015-06-18 21:09:10 +02:00
Florian Bruhin
b1334bcc22
Use repr() for unknown objects in utils.qualname.
2015-06-17 06:46:03 +02:00
Florian Bruhin
219c2f8ae8
Ignore "Unable to set geometry" warnings in tests.
...
This reverts commits 9b066ec50a
and
83f7cf84a9
.
This was still broken even after setting the geometry:
https://ci.appveyor.com/project/The-Compiler/qutebrowser
2015-06-12 17:04:12 +02:00
Florian Bruhin
8033931bae
Test key_to_string with all Qt.Key members.
2015-06-12 16:37:07 +02:00
Florian Bruhin
9b066ec50a
Set geometry in test_textbase.py.
...
See 83f7cf84a9
- it seems with the Qt 5.4.2
upgrade there are some more warnings on Windows.
2015-06-12 13:44:10 +02:00
Florian Bruhin
e8830a631e
Increase test_guiprocess timeouts.
...
Apparently 1 second is not enough for Windows to start a process...
2015-06-12 11:54:20 +02:00
Florian Bruhin
425fcdf8e4
Merge branch 'util-tests-1'
2015-06-12 11:50:57 +02:00
Florian Bruhin
36a2f4a15a
Fix newline stripping.
2015-06-11 23:14:56 +02:00
Florian Bruhin
fc32858e5c
Add GUIProcess tests.
2015-06-11 23:05:57 +02:00
Florian Bruhin
1956158096
Make keyword arguments work for MessageModule stub.
2015-06-11 23:03:15 +02:00
Florian Bruhin
fc5349e1dc
Change FakeQProcess stub to a function with spec.
2015-06-11 23:02:18 +02:00
Florian Bruhin
ad401e035f
Proxy QProcess signals.
2015-06-11 20:30:37 +02:00
Florian Bruhin
1f67353a40
Adjust editor tests for GUIProcess.
2015-06-11 20:30:28 +02:00
Florian Bruhin
163bc2e12e
Add GUIProcess.
...
This aims to unify the code which spawns a process and then shows statusbar
notifications when it exited, etc.
2015-06-11 20:30:03 +02:00
Florian Bruhin
3e8a394217
Disable no-member for pylint for os.SEEK_*.
...
This should fix pylint on Windows.
2015-06-11 10:49:06 +02:00
Florian Bruhin
480c4e878e
Ignore pylint warning on Ubuntu/Travis.
2015-06-11 10:26:18 +02:00
Florian Bruhin
171a0f201b
Merge branch 'relapaths' of https://github.com/lamarpavel/qutebrowser into lamarpavel-relapaths
2015-06-08 18:48:11 +02:00
Lamar Pavel
7f27c183be
Include expandvars in File.validate
...
I thought I put this in here before, but apparently I did not. So here it is,
together with a new test to verify it. Other tests needed to be updated with a
mock for os.path.expandvars.
2015-06-08 13:18:16 +02:00
Florian Bruhin
c08078841f
Fix test_qprocess.
2015-06-08 07:49:22 +02:00
Florian Bruhin
1fcce12870
Fix TestPyQIODevice.failing_open on Windows.
2015-06-08 07:45:19 +02:00
Florian Bruhin
00747be9d3
Fix TestSavefileOpen.test_existing_dir on older Qt.
2015-06-08 07:43:40 +02:00
Florian Bruhin
261c44bea9
Fix TestPyQIODevice.test_qprocess on Windows.
2015-06-08 07:42:17 +02:00
Florian Bruhin
1e982a9a84
Add/improve tests for qutebrowser.utils.qtutils.
2015-06-07 23:20:34 +02:00
Florian Bruhin
e60f698615
Add/improve tests for qutebrowser.utils.standarddir.
2015-06-07 23:20:34 +02:00
Florian Bruhin
df53ccf426
Write tests for qutebrowser.utils.version.
2015-06-07 23:20:34 +02:00
Florian Bruhin
4204579c06
Add/improve tests for qutebrowser.utils.utils.
2015-06-07 22:53:30 +02:00
Florian Bruhin
83f7cf84a9
tests: Set progress widget geometry.
...
This hopefully fixes this warning on Windows:
QWindowsWindow::setGeometryDp: Unable to set geometry 113x16+192+124 on
QWidgetWindow/'ProgressClassWindow'. Resulting geometry: 124x16+192+124
(frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 0x0, maximum
size: 16777215x16777215).
2015-06-07 11:14:14 +02:00
Florian Bruhin
e98a05e53d
Fix scroll_anchor in javascript tests.
...
It seems scrollRequested doesn't actually get emitted.
2015-06-07 10:38:58 +02:00
Florian Bruhin
e86a79740a
Use raising=True for QtBot.waitSignal.
2015-06-07 02:30:36 +02:00
Florian Bruhin
aa4cb2927d
Fix TestHideQtWarning tests for pytest 1.4.0.
...
pytest captures the Qt logging messages, so we can't use qWarning to test.
2015-06-07 02:29:20 +02:00
Florian Bruhin
2117b2afc6
Revert "Skip test which might be responsible for segfaults."
...
This reverts commit 592ace18d4
.
2015-06-07 01:25:10 +02:00
Martin Tournoij
463e85ff5d
Add referer-header setting, #712
2015-06-05 18:00:21 +02:00
Florian Bruhin
8001099661
Adjust tests.
2015-06-05 17:45:32 +02:00
Lamar Pavel
402aa66756
Merge branch 'master' of github.com:The-Compiler/qutebrowser
2015-06-05 16:10:55 +02:00
Florian Bruhin
9ec6e6da80
Fix exit status codes to be 0-based.
2015-06-04 15:13:20 +02:00