"ValueError: I/O operation on closed file" in Github test runner
Created by: gkirgizov
Several PRs on github are failing now because of this error.
Seems related to these problems in pytest
- https://github.com/pytest-dev/pytest/issues/5502#issuecomment-526348052
- https://github.com/pytest-dev/pytest/issues/3344
UPD: Problem is because pytest tampers with stdout/stderr. Anything that uses them, can cause this problem (logging
, print
, tqdm
in our case)
UPD2: Now the only problem is tqdm that must be disabled completely in certain tests
UPD3: more related things
- https://github.com/pytest-dev/pytest/issues/14#issuecomment-521577819
- possibly this also: https://github.com/JonathanCasey/asana_extensions/issues/51 (there's usage of capsys in one test)