(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
| 149 | assert root.level == logging.WARNING |
| 150 | |
| 151 | def test_delay_true(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: |
| 152 | monkeypatch.setenv("XDG_STATE_HOME", str(tmp_path)) |
| 153 | _setup_logging(logging.INFO) |
| 154 | |
| 155 | root = logging.getLogger() |
| 156 | file_handlers = [h for h in root.handlers if isinstance(h, RotatingFileHandler)] |
| 157 | assert len(file_handlers) == 1 |
| 158 | # delay=True means the file is not opened until first emit |
| 159 | log_file = tmp_path / "unity-cli" / "logs" / "relay.log" |
| 160 | assert not log_file.exists() |
| 161 | |
| 162 | |
| 163 | class TestLogConstants: |
nothing calls this directly
no test coverage detected