From 4a1408350709d18483f7677d56d8faed08142129 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 13 Sep 2016 07:59:21 +0200 Subject: [PATCH] Fix :jseval --world contitional in set_text_field See #1942 --- tests/end2end/features/test_yankpaste_bdd.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/end2end/features/test_yankpaste_bdd.py b/tests/end2end/features/test_yankpaste_bdd.py index 32cb67210..9deb4b3cf 100644 --- a/tests/end2end/features/test_yankpaste_bdd.py +++ b/tests/end2end/features/test_yankpaste_bdd.py @@ -21,6 +21,8 @@ import pytest import pytest_bdd as bdd +from PyQt5.QtCore import PYQT_VERSION + bdd.scenarios('yankpaste.feature') @@ -33,7 +35,7 @@ def init_fake_clipboard(quteproc): @bdd.when(bdd.parsers.parse('I set the text field to "{value}"')) def set_text_field(request, quteproc, value): - if request.config.webengine: + if request.config.webengine and PYQT_VERSION >= 0x50700: cmd = ":jseval --world=0 set_text('{}')".format(value) else: cmd = ":jseval set_text('{}')".format(value)