sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #50083
Re: [Question #677438]: Pass argument to test runner
Question #677438 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/677438
Status: Open => Answered
RaiMan proposed the following answer:
can be reduced to this:
#coming from sys.argv[1]:
"HagercadTests.regressionSuite()"
.... this is a string !!!
but for
runner.run(parameter)
parameter must be a test suite object !!!
Hence you first have to convert sys.argv[1] to a valid test suite.
eval() might be helpful ;-)
--- something like
runner.run(eval("unittest.TestLoader().loadTestsFromTestCase(" + sys.argv[1] ")")
where the parameter in this case must name the Test class.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.