← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #156130]: Is it possible to use arrays in Sikuli?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
This would work:

def test1():
	assert(False)
def test2():
	assert(True)
def test3():
	assert(False)

theTests = (test1, test2, test3)
theResults = []

for test in theTests:
	try:	
		test()
		print test.__name__, "ok"
	except AssertionError:
		theResults.append(test.__name__)
		print test.__name__, "Failed"

print theResults

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