Global variables and functions argument in unittest
Hi All,
I have just started working with SIKULI, its look very promising. I working on Windows 7 64bit.
I have two questions about unit test
1. how can I create global variables in unit test scrip ? I have following example, but cause exception:
globalvar = 0
def useFilter(self):
print "in filter"
global globalvar
print "in filter1"
globalvar = globalvar + 1
print "in filter2"
print globalvar
print "in filter3"
def setUp(self):
closeApp("my app")
wait(4)
switchApp(
wait(myApp.png ,30)
self.closeUpda
self.maximizeApp()
wait(1)
self.resetAppL
wait(1)
print "use filter"
self.useFilter()
I see that after step "in filter1" apears exception.
2. how can I create functions with more argument ?
Now I use only functions that have one "sefl" argument; is it possible to pass more arguments to functions in unit test ?
Regards
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply:
This question was reopened
- by Sebastian