tests/ide_tests/run_python_exemple.sikuli/run_python_exemple.py
branchwxPython4
changeset 3447 65c5f66e9298
parent 3446 de8cc85b688a
child 3720 d0a9c01ee7a5
--- a/tests/ide_tests/run_python_exemple.sikuli/run_python_exemple.py	Tue Mar 29 08:50:01 2022 +0200
+++ b/tests/ide_tests/run_python_exemple.sikuli/run_python_exemple.py	Thu Apr 07 07:40:32 2022 +0200
@@ -11,34 +11,29 @@
 # common test definitions module
 from sikuliberemiz import *
 
-# Start the app
-app = BeremizApp(exemple="python")
+def test(app):
+    # Start the app
+    
+    app.k.Clean()
+    
+    app.waitForChangeAndIdleStdout()
+    
+    app.k.Build()
+    
+    app.waitForChangeAndIdleStdout()
+    
+    app.k.Connect()
+    
+    app.waitForChangeAndIdleStdout()
+    
+    app.k.Transfer()
+    
+    app.waitForChangeAndIdleStdout()
+    
+    app.k.Run()
+      
+    # wait 10 seconds for 10 Grumpfs
+    return app.waitPatternInStdout("Grumpf", 10, 10)
+    
+run_test(test, exemple="python")
 
-app.k.Clean()
-
-app.waitForChangeAndIdleStdout()
-
-app.k.Build()
-
-app.waitForChangeAndIdleStdout()
-
-app.k.Connect()
-
-app.waitForChangeAndIdleStdout()
-
-app.k.Transfer()
-
-app.waitForChangeAndIdleStdout()
-
-app.k.Run()
-
-# wait 10 seconds for 10 Grumpfs
-found = app.waitPatternInStdout("Grumpf", 10, 10)
-
-app.close()
-
-if found:
-    exit(0)
-else:
-    exit(1)
-