This hopefully fixes this flaky error in test_notifications_with_ask__true on
OS X:
Failed: Logged unexpected errors:
LogLine('22:40:06 DEBUG js webpage:javaScriptConsoleMessage:531 [http://localhost:57758/data/prompt/notifications.html:28] [FAIL] unknown initial value for Notification.permission: denied')
[...]
testprocess.WaitForTimeout: Timed out after 15000ms waiting for {'message': 'Entering mode KeyMode.* (reason: question asked)'}.
This is a bit tricky since the test will actually run, but be marked as
skipped. The problem is we can't raise a pytest.skip.Exception during a test,
or it'll show up as an exception in a virtual Qt method.
Still this is better than nothing.
- The paste command will now open one tab/window per url if multiple
URLs (separated by newline) are present in the clipboard
- Adds the tests for the new multitab functionality
- Changes test/integration/conftest.py to be able to insert newlines in
the clipboard for the test
Using pytest.fail with pytrace=False hides the quteprocess output, which makes
it a lot harder to debug stuff.
This is because TestReport.longrepr is suddenly a string and we can't add infos
to it - see https://github.com/pytest-dev/pytest/issues/1316
- 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.
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.