import logging
def test_demo():
root_logger = logging.getLogger()
for handler in root_logger.handlers:
if isinstance(handler, logging.StreamHandler):
print(handler.stream.__class__.__mro__)
if handler.stream.isatty():
pass
Running this with pytest -o log_cli=true fails with:
> if handler.stream.isatty():
^^^^^^^^^^^^^^^^^^^^^^^
E TypeError: 'bool' object is not callable
Apparently because _pytest.terminal.TerminalReporter wrongly implements IOBase.isatty.
|
self.isatty = file.isatty() |
isatty should be a method not an attribute.