You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(unit_test): prevent logging from raising exceptions after tests
pytest's capsys just closes the stdout when done with tests. there are
issues tracking this problem, see pytest-dev/pytest#5577 .
but we adds a handler which redirect the logging messages to stdout. so,
once pytest finishes testing, exceptions are raised when writing logging
messages, like
```
22:37:20 File "/usr/local/lib/python3.10/logging/__init__.py", line 1101, in emit
22:37:20 stream.write(msg + self.terminator)
22:37:20 ValueError: I/O operation on closed file.
```
so, in this change, `logging.raiseExceptions` is disabled when pytest's
session finishes.
Fixesscylladb#6000
Signed-off-by: Kefu Chai <[email protected]>
0 commit comments