Florian Bruhin
ab0cd17772
Fix lint.
2016-01-08 10:00:42 +01:00
Florian Bruhin
9ed79ad57d
tests: Switch to qtbot.assertNotEmitted.
2016-01-08 10:00:42 +01:00
Florian Bruhin
f004e45566
tests: Remove pointless CookieJar test.
...
There's no code between those two lines which could possibly emit that signal.
2016-01-08 09:57:04 +01:00
Florian Bruhin
1fb34331e5
tests: Default to raising=True for qtbot.
...
- qtbot.waitSignal with raising=True is the default this way, so we remove the
raising=True.
- qtbot.waitSignal with raising=False stay untouched
- Some qtbot.waitSignal without raising had one added (because we don't want it
to raise)
- Some qtbot.waitSignal without raising actually should've raised, which they
do now.
2016-01-08 09:49:06 +01:00
Florian Bruhin
a0a6b488e6
tox: Update pytest-qt to 1.11.0.
...
- New qt_wait_signal_raising ini option can be used to override the default
value of the raising parameter of the qtbot.waitSignal and qtbot.waitSignals
functions when omitted:
Calls which explicitly pass the raising parameter are not affected.
- qtbot now has a new assertNotEmitted context manager which can be used to
ensure the given signal is not emitted.
2016-01-08 09:38:29 +01:00
Florian Bruhin
eebed7a5a7
tests: Poll clipboard for changes.
...
For some reason I can't explain, since 2b0870084b
we got test failures on OS X, as the clipboard had the old value before waiting
for the change, the new (correct) value after waiting for it, but never
actually emitted 'changed'.
We could just re-check the contents after the timeout, but that'd mean we wait
1s for every test where this weird thing happens.
Instead, we poll the clipboard for every 100ms as long as the timeout (1s)
hasn't passed, and return as soon as it has the correct contents.
2016-01-08 09:35:03 +01:00
Florian Bruhin
eef1604dcd
tests: Improve WaitForClipboardTimeout message.
2016-01-08 08:35:34 +01:00
Florian Bruhin
0d9cbba3b9
tests: Dump contents in WaitForClipboardTimeout.
2016-01-08 01:56:27 +01:00
Florian Bruhin
aecf410707
Make pylint shut up about pytest.config.
2016-01-08 01:16:58 +01:00
Florian Bruhin
2b0870084b
bdd: Run :tab-only between tests for caret/search.
...
Otherwise we end up opening a lot of tabs which slow down qutebrowser,
The latest issue in #1183 might actually be caused by that.
2016-01-08 00:58:01 +01:00
Florian Bruhin
5eafccb604
tests: Print logs live when -s is given.
2016-01-07 21:15:24 +01:00
Florian Bruhin
7ed3edd00f
tox: Add pytest-repeat.
...
Useful to track down flaky tests.
2016-01-07 21:03:48 +01:00
Florian Bruhin
9e9cedf3e0
tests: Shorten (not suppress) quteproc log w/o -v.
...
The output was almost always useless without -v because the debug log wasn't
shown at all, only error/info.
Now we display a maximum of 50 lines (regardless of what level) without -v.
2016-01-07 19:41:49 +01:00
Florian Bruhin
df6d9d741f
bdd: Add search tests for known bugs/regressions.
...
This adds a test for #874 , #507 and #940 .
2016-01-07 19:41:26 +01:00
Florian Bruhin
37022b8c45
bdd: Improve search tests.
2016-01-07 08:21:18 +01:00
Florian Bruhin
18b5860584
bdd: Add "When I open ... in a new window" step.
2016-01-07 08:20:48 +01:00
Florian Bruhin
f9645e447a
bdd: Add first tests for searching.
2016-01-07 07:49:45 +01:00
Florian Bruhin
6a592576eb
bdd: Fix timeout exception in _wait_for_clipboard.
2016-01-07 07:43:36 +01:00
Florian Bruhin
360f0b6180
bdd: Improve :inspector tests.
2016-01-07 07:12:51 +01:00
Florian Bruhin
ab22b7740f
bdd: Add test for :follow-selected --tab with JS.
2016-01-06 23:29:16 +01:00
Florian Bruhin
c9a35e7f1e
bdd: Add a test for :follow-selected --tab
2016-01-06 23:24:17 +01:00
Florian Bruhin
7cc98a1248
Fix lint.
2016-01-06 23:19:44 +01:00
Florian Bruhin
16ec035418
bdd: Handle trailing slash for URLs loaded.
...
For some reason, older Qt versions (Debian Jessie/Ubuntu Trusty) like to add a
/, so we need to handle that case too.
2016-01-06 23:19:04 +01:00
Florian Bruhin
a2c3f8c402
bdd: Add some tests for :follow-selected.
2016-01-06 22:59:42 +01:00
Florian Bruhin
916b294976
bdd: Fix regex escape.
...
The . chars weren't properly escaped.
2016-01-06 22:59:05 +01:00
Florian Bruhin
7dc03710b1
bdd: Only check logs for "... should be loaded".
...
Checking the requests from the webserver proved problematic, as often there's
some kind of caching going on. Instead, we only check the log, as this is used
for things like :navigate anyways, so if the log says the page got loaded, we
can trust it.
There's still "... should be requested" to check the actual requests.
2016-01-06 22:57:49 +01:00
Florian Bruhin
b1bf75f069
bdd: Add a test for :drop-selection.
2016-01-06 22:15:13 +01:00
Florian Bruhin
2d9900a5ad
bdd: Add test for :paste with invalid URL.
2016-01-06 22:07:19 +01:00
Florian Bruhin
bd611b7ee4
bdd: Skip :print test.
...
This sometimes seem to cause the following warning:
QPainter:🔚 Painter ended with 2 saved states
2016-01-06 18:27:14 +01:00
Florian Bruhin
275f1ede82
bdd: Add test for :undo.
2016-01-06 18:27:14 +01:00
Florian Bruhin
4bb38f1488
bdd: Handle some more corner cases in commands.py.
2016-01-06 18:27:14 +01:00
Florian Bruhin
3f15186a64
Add some coverage pragmas for caret workarounds.
2016-01-06 17:52:44 +01:00
Florian Bruhin
9720d879ad
Remove dead code.
2016-01-06 17:52:11 +01:00
Florian Bruhin
56766acf18
Add /qutebrowser/3rdparty/ to .gitignore.
2016-01-06 08:50:46 +01:00
Florian Bruhin
4099a40e35
Fix lint.
2016-01-06 08:50:22 +01:00
Florian Bruhin
d2a1282c0b
tests: Split up testprocess.wait_for.
2016-01-06 08:49:30 +01:00
Florian Bruhin
b1b767ed96
tests: Don't start Xvfb for unittests-nodisp.
2016-01-06 08:36:40 +01:00
Florian Bruhin
b0f001d3f1
Skip :print test when window can't be focused.
...
For some reason the window doesn't get focused on Travis. If that happens,
let's just skip the test instead of failing it.
2016-01-06 08:29:53 +01:00
Florian Bruhin
29dd6af976
tests: Optionally skip a test when waiting for log.
2016-01-06 08:29:46 +01:00
Florian Bruhin
6a97e98007
Fix lint.
2016-01-06 07:55:42 +01:00
Florian Bruhin
02e30873e1
Only test :print on Linux.
2016-01-06 07:54:54 +01:00
Florian Bruhin
fc755c104b
bdd: Add test for exception with :pyeval.
2016-01-06 07:42:33 +01:00
Florian Bruhin
03ebdfd641
bdd: Add tests for :pyeval.
2016-01-06 07:15:42 +01:00
Florian Bruhin
677dcd6748
bdd: Add tests for :print.
2016-01-06 07:15:34 +01:00
Florian Bruhin
2cadac6b6e
bdd: Add tests for :stop/:reload with wrong count.
2016-01-06 07:15:20 +01:00
Florian Bruhin
e2994e9375
bdd: Add "the page should contain the plaintext".
2016-01-06 07:15:06 +01:00
Florian Bruhin
c7edb8e1f2
Make QApplication available to :debug-pyeval.
2016-01-06 07:14:49 +01:00
Florian Bruhin
1619b89df7
pytest: Add a skip mark for use with bdd.
2016-01-06 07:14:30 +01:00
Florian Bruhin
1db662fbff
Update docs.
2016-01-06 06:31:56 +01:00
Florian Bruhin
05281a7d1f
Add a --quiet argument to :debug-pyeval.
...
Closes #1156 .
2016-01-06 06:19:37 +01:00