must import for each unittest test case
Experimenting with running Unittests with Sikuli X:
/Applications/
if I have my tests setup like this:
#test.sikuli
import os
def setUp(self):
myApp = "/Applications/
App.open(myApp)
print os.getenv(
def tearDown(self):
print "my test is done"
def test_mytest(self):
wait(
click(
The test will fail - with global os not found. In order for os.getenv - to work, I must import it in setup - or any other testcase where I would want to use it.
I expect to need various python and custom modules in my tests, and don't want to have to make the imports for each individual test case.
When I was using 10.2 - things were working as expected. Here's an example: https:/
these tests I was running using this command: java -d32 -Dpython.path=Lib/ -jar sikuli-script.jar MVC/sg59_
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- janet
- Solved:
- Last query:
- Last reply: