tests: Improve WaitForClipboardTimeout message.
This commit is contained in:
parent
0d9cbba3b9
commit
eef1604dcd
@ -403,11 +403,14 @@ def _wait_for_clipboard(qtbot, clipboard, mode, expected):
|
|||||||
QClipboard.Selection: 'primary selection',
|
QClipboard.Selection: 'primary selection',
|
||||||
}
|
}
|
||||||
raise WaitForClipboardTimeout(
|
raise WaitForClipboardTimeout(
|
||||||
"Timed out after {}ms waiting for {} in {} (clipboard: {!r}, "
|
"Timed out after {timeout}ms waiting for {what}:\n"
|
||||||
"primary {!r}).".format(
|
" expected: {expected!r}\n"
|
||||||
timeout, expected, mode_names[mode],
|
" clipboard: {clipboard!r}\n"
|
||||||
clipboard.text(mode=QClipboard.Clipboard),
|
" primary: {primary!r}.".format(
|
||||||
clipboard.text(mode=QClipboard.Selection))
|
timeout=timeout, what=mode_names[mode],
|
||||||
|
expected=expected,
|
||||||
|
clipboard=clipboard.text(mode=QClipboard.Clipboard),
|
||||||
|
primary=clipboard.text(mode=QClipboard.Selection))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user