python-coloredlogs icon indicating copy to clipboard operation
python-coloredlogs copied to clipboard

[BUG] 15.0.1 breaks `click.testing.CliRunner` run from `pytest` with `pytest-xdist`

Open ITProKyle opened this issue 4 years ago • 2 comments

My application updated from 15.0.0 to 15.0.1 via a dependabot PR earlier today. This resulted in click.testing.CliRunner raising ValueError: I/O operation on closed file. (logs) in our tests. I would assume the closed file it is referring to is sys.stderr.

Reverting back to 15.0.0 results in the tests passing (https://github.com/onicagroup/runway/pull/667).

ITProKyle avatar Jun 11 '21 16:06 ITProKyle

This looks to have been resolved somewhere along the line. Tested with coloredlogs==15.0.1 & click==8.1.3.

ITProKyle avatar Dec 21 '22 18:12 ITProKyle

Actually, i was wrong. I was checking without the --log-cli-format & --log-cli-level flags for pytest locally but upon pushing my most recent changes the error was present as the CI/CD pipeline passes those flags.

ITProKyle avatar Jan 03 '23 16:01 ITProKyle