MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / test_delay_true

Method test_delay_true

tests/test_relay_logging.py:151–160  ·  view source on GitHub ↗
(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch)

Source from the content-addressed store, hash-verified

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
163class TestLogConstants:

Callers

nothing calls this directly

Calls 1

_setup_loggingFunction · 0.90

Tested by

no test coverage detected