tox: tox doesn't write testing log

One of the biggest tox drawbacks is that it doesn’t write logs with errors that are presented to user. My scroll buffer is not enough to get to the first of failings tests. Example:

>tox
...
    if not path: raise CommandNotFound(program)
pbs.CommandNotFound: __path__

----------------------------------------------------------------------
Ran 2 tests in 0.107s

FAILED (errors=2)
ERROR: InvocationError: 'C:\\Documents and Settings\\user\\AppData\\Local\\Bin\...
___________________________________ summary ___________________________________
ERROR:   py27: commands failed
ERROR:   py36: commands failed

Grepping all files produced by tox, I can not find string pbs.CommandNotFound: __path__ anywhere.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (10 by maintainers)

Most upvoted comments

I am tired. I don’t want to use your ways of doing things. I just want the damn tool to write damn log into damn log directory that already exists for that purpose in each damn environment that it creates. Damn. )

So we’re doing o.k. on the docs side for that bit, I guess 🎉

The point to run a single test is because tox is too slow and usually I leave it to run,

There’s no builtin support for that, but you can easily support it yourself by using {posargs}. For example pytest’s tox.ini does this:

[testenv]
commands= pytest --lsof -rfsxX {posargs:testing}

Here {posargs} will be replaced by anything passed after -- in the commandline, or testing if nothing is given (as a default value). So it is possible to do this:

tox -e py27,py36 -- testing\acceptance_test.py -v

And tox will execute:

pytest --lsof -rfsxX testing\acceptance_test.py -v

In each test environment.