- Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
Description
Just upgraded to 0.21 from 0.20 for Werkzeug, and am now getting resource warnings from within pytest-xprocess.
pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/home/david/.local/share/virtualenvs/werkzeug/lib/python3.10/site-packages/xprocess/xprocess.py", line 274, in ensure lines = info.logpath.open().readlines() ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/david/Projects/pallets/werkzeug/.pytest_cache/d/.xprocess/dev_server-test_streaming_chunked_response/xprocess.log' mode='r' encoding='UTF-8'>
The line it's pointing to is this, where a file is opened but not closed.
pytest-xprocess/xprocess/xprocess.py
Lines 273 to 274 in 5363447
# skip previous process logs | |
lines = info.logpath.open().readlines() |