def main(args=None): args = sys.argv[1:] if args is None else args if args and args[0] == "--version": print("detox {} running as plugin in tox:".format(__version__)) # fall through to let tox add its own version info ... config = tox_prepare(args) detox = Detox(config) if not hasattr(config.option, "quiet_level") or not config.option.quiet_level: detox.startloopreport() return detox.runtestsmulti(detox.toxsession.evaluated_env_list())
def main(args=None): if args is None: args = sys.argv[1:] config = parse(args) # now = py.std.time.time() detox_instance = Detox(config) detox_instance.startloopreport() retcode = detox_instance.runtestsmulti(config.envlist) # elapsed = py.std.time.time() - now # cumulated = detox.toxsession.report.cumulated_time # detox.toxsession.report.line( # "detox speed-up: %.2f (elapsed %.2f, cumulated %.2f)" % ( # cumulated / elapsed, elapsed, cumulated), bold=True) return retcode
def pytest_funcarg__detox(request): exampledir = request.getfuncargvalue("exampledir") old = exampledir.chdir() try: return Detox(detox.main.parse([])) finally: old.chdir()
def main(args=None): args = sys.argv[1:] if args is None else args if args and args[0] == "--version": print("detox {} running as plugin in tox:".format(__version__)) # fall through to let tox add its own version info ... config = tox_prepare(args) detox = Detox(config) if not hasattr(config.option, "quiet_level") or not config.option.quiet_level: detox.startloopreport() ret = detox.runtestsmulti(detox.toxsession.evaluated_env_list()) print("### WARNING ###\n\n" "detox is not compatible with versions of tox > 3.6." "Consider uninstalling detox and upgrading tox to >= 3.7" "to use its parallel mode.") return ret
def detox(exampledir): old = exampledir.chdir() try: return Detox(tox_prepare([])) finally: old.chdir()