[TIP] tox: output redirection
holger krekel
holger at merlinux.eu
Mon Jan 25 02:12:34 PST 2016
Hi Anatoly,
On Mon, Jan 25, 2016 at 13:08 +0300, anatoly techtonik wrote:
> Hi,
>
> I need to redirect the result of test to a file, but tox errors out
> with invocation
> error:
>
> ...
> py35 runtests: commands[3] | C:\hexdump\.tox\py35\Scripts\python
> hexdump.py -r data/hexdump-wireshark.txt > hexdump-wireshark.bin
> Usage:
> hexdump.py [binfile|-]
> hexdump.py -r hexfile
> hexdump.py --test [logfile]
>
> Options:
> --version show program's version number and exit
> -h, --help show this help message and exit
> -r, --restore restore binary from hex dump
> --test run hexdump sanity checks
> ERROR: InvocationError: 'C:\\hexdump\\.tox\\py35\\Scripts\\python
> hexdump.py -r data/hexdump-wireshark.txt > hexdump-wireshark.bin'
>
>
> Looks like tox doesn't support output redirection. What are my options?
>
> [tox]
> envlist = py27, py35
>
> [testenv]
> commands =
> {envpython} hexdump.py -r data/hexdump-wireshark.txt > hexdump-wireshark.bin
Writing a script and calling that from commands and which does the output redirection.
Or doing a PR that introduces output redirection to tox commands.
best,
holger
> Please, CC.
> --
> anatoly t.
>
--
about me: http://holgerkrekel.net/about-me/
contracting: http://merlinux.eu
More information about the testing-in-python
mailing list