def runTests(testDir, verbosity=1):
 ensureRoot()
 cleanup()
 testSuite = defaultTestLoader.discover(testDir)
 success = TextTestRunner(verbosity=verbosity).run(testSuite).wasSuccessful()
 sys.exit((0 if success else 1))

def runTests ( testDir , verbosity = 1 ) : ensureRoot ( ) cleanup ( ) testSuite = defaultTestLoader . discover ( testDir ) success = TextTestRunner ( verbosity = verbosity ) . run ( testSuite ) . wasSuccessful ( ) sys . exit ( ( 0 if success else 1 ) )
run tests in vm .