← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #210536]: Error message when using import: 'with' will become a reserved keyword in Python

 

Question #210536 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/210536

    Status: Solved => Open

Jan is still having a problem:
But ... running it as test-case does not work (IDE and commandoline)

Sourcecode:
----------------------------
MyTest.sikuli:
import MyLib

def setUp(self):
    print "setUp"
    
def tearDown(self):
    print "tearDown"
    
def testMy(self):
    print "testMy"
    MyLib.initApp()


MyLib.sikuli:
#from __future__ import with_statement # same result with or without that line
from sikuli import *

def initApp():
    anyapp = App.open("/Applications/TextEdit.app")
    with Region(anyapp.window()):
        print('it works')
----------------------------

Output from commandoline:
localhost$ /Applications/Sikuli-IDE.app/sikuli-ide.sh --stderr --test /.../Tests/Sikuli/en/MyTest.sikuli
[info] Sikuli vision engine loaded.
[info] Mac OS X utilities loaded.
[info] VDictProxy loaded.
[error] null

Running the test-case from IDE crashes the IDE.

Any ideas?

Thanks,
Jan

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.