From 6a592576eb5bfab14122efbf0eea79ec457a663c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 7 Jan 2016 07:43:36 +0100 Subject: [PATCH] bdd: Fix timeout exception in _wait_for_clipboard. --- tests/integration/features/conftest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/integration/features/conftest.py b/tests/integration/features/conftest.py index c723eb2d6..90a41339a 100644 --- a/tests/integration/features/conftest.py +++ b/tests/integration/features/conftest.py @@ -35,6 +35,11 @@ from PyQt5.QtGui import QClipboard from helpers import utils +class WaitForClipboardTimeout(Exception): + + """Raised when _wait_for_clipboard didn't get the expected message.""" + + def _clipboard_mode(qapp, what): """Get the QClipboard::Mode to use based on a string.""" if what == 'clipboard': @@ -390,7 +395,7 @@ def _wait_for_clipboard(qtbot, clipboard, mode, expected): QClipboard.Clipboard: 'clipboard', QClipboard.Selection: 'primary selection', } - raise WaitForTimeout( + raise WaitForClipboardTimeout( "Timed out after {}ms waiting for {} in {}.".format( timeout, expected, mode_names[mode]))