def suiteVisit(suite, visitor):
 warnings.warn('Test visitors deprecated in Twisted 8.0', category=DeprecationWarning)
 for case in suite._tests:
  visit = getattr(case, 'visit', None)
  if (visit is not None):
   visit(visitor)
  elif isinstance(case, pyunit.TestCase):
   case = itrial.ITestCase(case)
   case.visit(visitor)
  elif isinstance(case, pyunit.TestSuite):
   suiteVisit(case, visitor)
  else:
   case.visit(visitor)

def suiteVisit ( suite , visitor ) : warnings . warn ( 'Test visitors deprecated in Twisted 8.0' , category = DeprecationWarning ) for case in suite . _tests : visit = getattr ( case , 'visit' , None ) if ( visit is not None ) : visit ( visitor ) elif isinstance ( case , pyunit . TestCase ) : case = itrial . ITestCase ( case ) case . visit ( visitor ) elif isinstance ( case , pyunit . TestSuite ) : suiteVisit ( case , visitor ) else : case . visit ( visitor )
visit each test in c{suite} with c{visitor} .