tests/ide_tests/run_python_exemple.sikuli/run_python_exemple.py
branchwxPython4
changeset 3447 65c5f66e9298
parent 3446 de8cc85b688a
child 3720 d0a9c01ee7a5
equal deleted inserted replaced
3446:de8cc85b688a 3447:65c5f66e9298
     9 addImportPath(os.path.dirname(getBundlePath()))
     9 addImportPath(os.path.dirname(getBundlePath()))
    10 
    10 
    11 # common test definitions module
    11 # common test definitions module
    12 from sikuliberemiz import *
    12 from sikuliberemiz import *
    13 
    13 
    14 # Start the app
    14 def test(app):
    15 app = BeremizApp(exemple="python")
    15     # Start the app
       
    16     
       
    17     app.k.Clean()
       
    18     
       
    19     app.waitForChangeAndIdleStdout()
       
    20     
       
    21     app.k.Build()
       
    22     
       
    23     app.waitForChangeAndIdleStdout()
       
    24     
       
    25     app.k.Connect()
       
    26     
       
    27     app.waitForChangeAndIdleStdout()
       
    28     
       
    29     app.k.Transfer()
       
    30     
       
    31     app.waitForChangeAndIdleStdout()
       
    32     
       
    33     app.k.Run()
       
    34       
       
    35     # wait 10 seconds for 10 Grumpfs
       
    36     return app.waitPatternInStdout("Grumpf", 10, 10)
       
    37     
       
    38 run_test(test, exemple="python")
    16 
    39 
    17 app.k.Clean()
       
    18 
       
    19 app.waitForChangeAndIdleStdout()
       
    20 
       
    21 app.k.Build()
       
    22 
       
    23 app.waitForChangeAndIdleStdout()
       
    24 
       
    25 app.k.Connect()
       
    26 
       
    27 app.waitForChangeAndIdleStdout()
       
    28 
       
    29 app.k.Transfer()
       
    30 
       
    31 app.waitForChangeAndIdleStdout()
       
    32 
       
    33 app.k.Run()
       
    34 
       
    35 # wait 10 seconds for 10 Grumpfs
       
    36 found = app.waitPatternInStdout("Grumpf", 10, 10)
       
    37 
       
    38 app.close()
       
    39 
       
    40 if found:
       
    41     exit(0)
       
    42 else:
       
    43     exit(1)
       
    44