(self, pytester: Pytester, monkeypatch, isatty: bool)
| 472 | |
| 473 | @pytest.mark.parametrize("isatty", [True, False]) |
| 474 | def test_isatty(self, pytester: Pytester, monkeypatch, isatty: bool) -> None: |
| 475 | config = pytester.parseconfig() |
| 476 | f = StringIO() |
| 477 | monkeypatch.setattr(f, "isatty", lambda: isatty) |
| 478 | tr = TerminalReporter(config, f) |
| 479 | assert tr.isatty() == isatty |
| 480 | # It was incorrectly implemented as a boolean so we still support using it as one. |
| 481 | assert bool(tr.isatty) == isatty |
| 482 | |
| 483 | |
| 484 | class TestCollectonly: |
nothing calls this directly
no test coverage detected