From a90618128de1388750eb7ffd7eb23ea0c715acad Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 3 Feb 2016 06:55:21 +0100 Subject: [PATCH] tests: Empty clipboard after testing if it works. Otherwise, if a test fails to actually put something into the clipboard, we end up pasting "Does this work?" which could e.g. trigger a search. When it's cleared, we at least get some "clipboard is empty" error instead. --- tests/integration/features/test_yankpaste.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/features/test_yankpaste.py b/tests/integration/features/test_yankpaste.py index 7fce22a0e..3770fd407 100644 --- a/tests/integration/features/test_yankpaste.py +++ b/tests/integration/features/test_yankpaste.py @@ -39,6 +39,9 @@ def skip_with_broken_clipboard(qtbot, qapp): if clipboard.text() != "Does this work?": pytest.skip("Clipboard seems to be broken on this platform.") + with qtbot.waitSignal(clipboard.changed): + clipboard.clear() + @bdd.when(bdd.parsers.parse('I set the text field to "{value}"')) def set_text_field(quteproc, value):