← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #134349]: setUp and tearDown per class not per test fixture

 

Question #134349 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/134349

Jörg requested more information:
Thx, I now got the following solution, working multiple times in the
IDE, by setting already_done to None at tearDown:

def setUp(self):
 print "setup entry"
 try:
  Settings.already_done += 1
  if Settings.already_done > 0: return
 except:
  Settings.already_done = 0
  print "setup processing"
  # your other code

def tearDown(self):
 print "teardown entry"
 if Settings.already_done >= "number of tests -1":
  print "teardown processing"
  Settings.already_done = None
  # your other code

def testA(self):
 print "testA"
 return True

def testB(self):
 print "testB"
 return True

def testC(self):
 print "testC"
 return True

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.