From fde105b3eb40698196b6569b78f43379a8cf68f1 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 20 Sep 2025 00:06:50 +0000 Subject: [PATCH 1/2] Fix: Ensure sqlite logger is enabled in CI tests Co-authored-by: derek --- tests/pytest/test_pytest_ensure_logging.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/pytest/test_pytest_ensure_logging.py b/tests/pytest/test_pytest_ensure_logging.py index e57b3c8c..421cabbf 100644 --- a/tests/pytest/test_pytest_ensure_logging.py +++ b/tests/pytest/test_pytest_ensure_logging.py @@ -6,6 +6,14 @@ async def test_ensure_logging(monkeypatch): """ Ensure that default SQLITE logger gets called by mocking the storage and checking that the storage is called. """ + # Ensure default sqlite logger is enabled in CI environments and reset lazy cache + monkeypatch.setenv("DISABLE_EP_SQLITE_LOG", "0") + from eval_protocol.dataset_logger import default_logger as _dl + # Reset the cached underlying logger so it re-initializes with the current env + try: + monkeypatch.setattr(_dl, "_logger", None, raising=False) + except Exception: + pass # Mock the SqliteEvaluationRowStore to track calls mock_store = Mock() mock_store.upsert_row = Mock() From 826a5faab673c55631fdf9fd00d035c41a3c0b7d Mon Sep 17 00:00:00 2001 From: Derek Xu Date: Fri, 19 Sep 2025 22:46:16 -0700 Subject: [PATCH 2/2] formatting --- tests/pytest/test_pytest_ensure_logging.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/pytest/test_pytest_ensure_logging.py b/tests/pytest/test_pytest_ensure_logging.py index 421cabbf..48c3dce4 100644 --- a/tests/pytest/test_pytest_ensure_logging.py +++ b/tests/pytest/test_pytest_ensure_logging.py @@ -9,6 +9,7 @@ async def test_ensure_logging(monkeypatch): # Ensure default sqlite logger is enabled in CI environments and reset lazy cache monkeypatch.setenv("DISABLE_EP_SQLITE_LOG", "0") from eval_protocol.dataset_logger import default_logger as _dl + # Reset the cached underlying logger so it re-initializes with the current env try: monkeypatch.setattr(_dl, "_logger", None, raising=False)