Thanks for your work on this project! It's incredibly useful!
However, I noticed that the execute function merges the stderr output of the container into stdout.
|
output = subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True) |
This makes it difficult to distinguish between standard output and error messages. This makes things partically tricky when working with structured outputs (say, JSON), where warnings that can be ignored are printed to standard error. Merged output can't be decoded and it's challenging to filter-out warning messages.
Would it be possible to modify the execute function, to return stdout and stderr separately, or provide an option to keep them distinct? This would greatly improve usability when handling container output.
Thanks for your work on this project! It's incredibly useful!
However, I noticed that the
executefunction merges thestderroutput of the container intostdout.pytest-docker/src/pytest_docker/plugin.py
Line 27 in d8939c8
This makes it difficult to distinguish between standard output and error messages. This makes things partically tricky when working with structured outputs (say, JSON), where warnings that can be ignored are printed to standard error. Merged output can't be decoded and it's challenging to filter-out warning messages.
Would it be possible to modify the
executefunction, to returnstdoutandstderrseparately, or provide an option to keep them distinct? This would greatly improve usability when handling container output.