aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobert Löhning <robert.loehning@qt.io>2024-04-05 11:06:26 +0200
committerRobert Löhning <robert.loehning@qt.io>2024-04-18 15:07:56 +0000
commit20f01b351cec98e3acafa8e03a63d17ff898acbd (patch)
treed835dd1fd4a3a62dbd373410f79b2f8317354c53 /tests
parent87fb3358d16d81f2e135027a80db79f9c43fbf70 (diff)
SquishTests: Replace wait condition strings with lambdas
Squish allows passing wait conditions as strings containing python code. The only advantage I see is that the notation is a little shorter than using a lambda. On the other hand, the strings can't get proper syntax highlighting and cause false positive warnings about unused variables. Change-Id: I226840fa26dc75d07d89f20647d069e2e866bbc9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/system/suite_general/tst_openqt_creator/test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/system/suite_general/tst_openqt_creator/test.py b/tests/system/suite_general/tst_openqt_creator/test.py
index c0cbc815a2..3c55342fc2 100644
--- a/tests/system/suite_general/tst_openqt_creator/test.py
+++ b/tests/system/suite_general/tst_openqt_creator/test.py
@@ -21,13 +21,13 @@ def main():
openQmakeProject(os.path.join(pathSpeedcrunch, "src", "speedcrunch.pro"),
[Targets.DESKTOP_5_14_1_DEFAULT])
# Wait for parsing to complete
- waitFor("runButton.enabled", 30000)
+ waitFor(lambda: runButton.enabled, 30000)
# Starting before opening, because this is where Creator froze (QTCREATORBUG-10733)
startopening = datetime.utcnow()
openQmakeProject(pathCreator, [Targets.DESKTOP_5_14_1_DEFAULT])
# Wait for parsing to complete
startreading = datetime.utcnow()
- waitFor("runButton.enabled", 300000)
+ waitFor(lambda: runButton.enabled, 300000)
secondsOpening = (datetime.utcnow() - startopening).seconds
secondsReading = (datetime.utcnow() - startreading).seconds
timeoutOpen = 45