How to use the tox.reporter 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 / package / builder / isolated.py View on Github external
def abort(message):
        reporter.error("{} inside {}".format(message, toml_file))
        raise SystemExit(1)
github tox-dev / tox / src / tox / interpreters / via_path.py View on Github external
stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        universal_newlines=True,
    )
    out, err = proc.communicate()
    if not proc.returncode:
        try:
            result = json.loads(out)
        except ValueError as exception:
            failure = exception
        else:
            _python_info_cache[cmd] = result
            return result.copy()
    else:
        failure = "exit code {}".format(proc.returncode)
    reporter.verbosity1("{!r} cmd {!r} out {!r} err {!r} ".format(failure, cmd, out, err))
github tox-dev / tox / src / tox / interpreters / __init__.py View on Github external
def get_executable(self, envconfig):
        """ return path object to the executable for the given
        name (e.g. python2.7, python3.6, python etc.)
        if name is already an existing path, return name.
        If an interpreter cannot be found, return None.
        """
        try:
            return self.name2executable[envconfig.envname]
        except KeyError:
            exe = self.hook.tox_get_python_executable(envconfig=envconfig)
            reporter.verbosity2("{} uses {}".format(envconfig.envname, exe))
            self.name2executable[envconfig.envname] = exe
            return exe