def run_with(*drivers):
 def decorator(test):
  if (isinstance(test, type) and issubclass(test, TestBase)):
   for attr in dir(test):
    value = getattr(test, attr)
    if (callable(value) and attr.startswith('test_')):
     if six.PY3:
      value._run_with = drivers
     else:
      value.__func__._run_with = drivers
  else:
   test._run_with = drivers
  return test
 return decorator

def run_with ( * drivers ) : def decorator ( test ) : if ( isinstance ( test , type ) and issubclass ( test , TestBase ) ) : for attr in dir ( test ) : value = getattr ( test , attr ) if ( callable ( value ) and attr . startswith ( 'test_' ) ) : if six . PY3 : value . _run_with = drivers else : value . __func__ . _run_with = drivers else : test . _run_with = drivers return test return decorator
used to mark tests that are only applicable for certain db driver .