How to use the tox.reporter.line function in tox

To help you get started, we’ve selected a few tox examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tox-dev / tox / src / tox / session / commands / help.py View on Github external
def show_help(config):
    reporter.line(config._parser._format_help())
    reporter.line("Environment variables", bold=True)
    reporter.line("TOXENV: comma separated list of environments (overridable by '-e')")
    reporter.line("TOX_SKIP_ENV: regular expression to filter down from running tox environments")
    reporter.line(
        "TOX_TESTENV_PASSENV: space-separated list of extra environment variables to be "
        "passed into test command environments"
    )
    reporter.line("PY_COLORS: 0 disable colorized output, 1 enable (default)")
    reporter.line("TOX_PARALLEL_NO_SPINNER: 1 disable spinner for CI, 0 enable (default)")
github tox-dev / tox / src / tox / session / commands / help.py View on Github external
def show_help(config):
    reporter.line(config._parser._format_help())
    reporter.line("Environment variables", bold=True)
    reporter.line("TOXENV: comma separated list of environments (overridable by '-e')")
    reporter.line("TOX_SKIP_ENV: regular expression to filter down from running tox environments")
    reporter.line(
        "TOX_TESTENV_PASSENV: space-separated list of extra environment variables to be "
        "passed into test command environments"
    )
    reporter.line("PY_COLORS: 0 disable colorized output, 1 enable (default)")
    reporter.line("TOX_PARALLEL_NO_SPINNER: 1 disable spinner for CI, 0 enable (default)")
github tox-dev / tox / src / tox / session / __init__.py View on Github external
exit_code = 1
            else:
                if not status:
                    status = "commands succeeded"
                msg = "  {}: {}".format(venv.envconfig.envname, status)
            if not is_parallel_child:
                report(msg)
        if not exit_code and not is_parallel_child:
            reporter.good("  congratulations :)")
        path = self.config.option.resultjson
        if path:
            if not is_parallel_child:
                self._add_parallel_summaries()
            path = py.path.local(path)
            data = self.resultlog.dumps_json()
            reporter.line("write json report at: {}".format(path))
            path.write(data)
        return exit_code
github tox-dev / tox / src / tox / session / commands / show_env.py View on Github external
def report_env(e):
        if description:
            text = env_conf[e].description or "[no description]"
            msg = "{} -> {}".format(e.ljust(max_length), text).strip()
        else:
            msg = e
        report.line(msg)

    for e in default:
        report_env(e)
    if all_envs and extra:
        if description:
            if default:
                report.line("")
            report.line("additional environments:")
        for e in extra:
            report_env(e)
github tox-dev / tox / src / tox / session / commands / show_env.py View on Github external
max_length = max(len(env) for env in (default + extra))

    def report_env(e):
        if description:
            text = env_conf[e].description or "[no description]"
            msg = "{} -> {}".format(e.ljust(max_length), text).strip()
        else:
            msg = e
        report.line(msg)

    for e in default:
        report_env(e)
    if all_envs and extra:
        if description:
            if default:
                report.line("")
            report.line("additional environments:")
        for e in extra:
            report_env(e)
github tox-dev / tox / src / tox / session / commands / help.py View on Github external
def show_help(config):
    reporter.line(config._parser._format_help())
    reporter.line("Environment variables", bold=True)
    reporter.line("TOXENV: comma separated list of environments (overridable by '-e')")
    reporter.line("TOX_SKIP_ENV: regular expression to filter down from running tox environments")
    reporter.line(
        "TOX_TESTENV_PASSENV: space-separated list of extra environment variables to be "
        "passed into test command environments"
    )
    reporter.line("PY_COLORS: 0 disable colorized output, 1 enable (default)")
    reporter.line("TOX_PARALLEL_NO_SPINNER: 1 disable spinner for CI, 0 enable (default)")