def unitTests():
 try:
  if (sys.version[0] == '3'):
   out = check_output('PYTHONPATH=. py.test-3', shell=True)
  else:
   out = check_output('PYTHONPATH=. py.test', shell=True)
  ret = 0
 except Exception as e:
  out = e.output
  ret = e.returncode
 print out.decode('utf-8')
 return ret

def unitTests ( ) : try : if ( sys . version [ 0 ] == '3' ) : out = check_output ( 'PYTHONPATH=. py.test-3' , shell = True ) else : out = check_output ( 'PYTHONPATH=. py.test' , shell = True ) ret = 0 except Exception as e : out = e . output ret = e . returncode print out . decode ( 'utf-8' ) return ret
run all unit tests return the exit code .