sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #03217
Re: [Question #160003]: Global variables and functions argument in unittest
Question #160003 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/160003
Status: Open => Answered
RaiMan proposed the following answer:
Do it just as shown in the basic example under the above link to setup a
test class.
To run it, use the suite approach instead of the main() approach.
this is the general template:
class TestYouNameIt(unittest.TestCase):
def setUp(self):
pass
def teardown(self):
pass
def testName1(self):
pass
suite = unittest.TestLoader().loadTestsFromTestCase(TestYouNameIt)
unittest.TextTestRunner().run(suite)
- substitute the pass statements with your own code
- have a look at the docs for the unittest.TextTestRunner options
- run it normally in Sikuli IDE or from command line (do NOT use option -t)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.