sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #10725
Re: [Question #194681]: Use String to call Function?
Question #194681 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/194681
RaiMan proposed the following answer:
import InitSystem
modulesToRun = ("Test1","Test2")
if (InitSystem.startUp()==0): # Init the tests
popup("ERROR during Login, cancelling all tests...")
exit
else: # Login was OK
# Testing Target: Full Text Search
for t in modulesToRun:
exec("import "+ t)
exec(t + ".runModule()")
InitSystem.shutDown() # Shut down the test
But why inventing the wheel again? Why do you not use the mighty
unittest module?
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.