-
- Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Description
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.
pytest/src/_pytest/terminal.py
Line 390 in b6e8144
self.isatty = file.isatty() |
isatty
should be a method not an attribute.
Metadata
Metadata
Assignees
Labels
No labels