pytest-reportlog icon indicating copy to clipboard operation
pytest-reportlog copied to clipboard

Feature Request: Print JSON to stdout

Open jgarte opened this issue 2 years ago • 6 comments

From reading through the documentation I didn't see support for printing the json data to stdout. It looks like it currently only supports writing to a file. Could we better support this via a CLI flag?

See the following request proposal as well: https://github.com/pytest-dev/pytest/issues/9704#issue-1146124924

jgarte avatar Jul 25 '23 12:07 jgarte

On Linux, you should be able to use /dev/stdout as filename - but I suppose it would make sense to have something more cross-platform than that.

The-Compiler avatar Jul 25 '23 13:07 The-Compiler

The to terminal option should also disable Terminal output and ensure io capture is not disabled

RonnyPfannschmidt avatar Jul 25 '23 13:07 RonnyPfannschmidt

I think that it would also be cool if printing to stdout is the default.

jgarte avatar Jul 26 '23 02:07 jgarte

I strongly disagree - having the reportlog output interspersed with normal pytest output sounds like it'd make that output unusable for both machines and humans.

The-Compiler avatar Jul 26 '23 06:07 The-Compiler

I strongly disagree - ...

But do you strongly agree with me that Python is still the best programming language currently? 😜

jgarte avatar Jul 26 '23 19:07 jgarte

Python can never hope to be the best, but im very happy it's gleefully fun at solving a good chunk of my problems

RonnyPfannschmidt avatar Jul 26 '23 19:07 RonnyPfannschmidt