fix: test_run_all_aggregations 실패 수정 #112

Closed
opened 2026-02-10 00:17:07 +09:00 by agentson · 0 comments
Collaborator

현상

pytest 실행 시 1건의 테스트가 실패합니다.

실패 테스트: tests/test_context.py::TestContextAggregator::test_run_all_aggregations

tests/test_context.py:302: in test_run_all_aggregations
    assert store.get_context(ContextLayer.L6_DAILY, date, "total_pnl") == 1000.0
E   AssertionError: assert None == 1000.0

원인 분석

ContextAggregator.run_all_aggregations()가 L6_DAILY 레이어에 total_pnl 값을 제대로 저장하지 못하고 있음. get_context()None을 반환하므로 aggregation 로직 또는 store 저장 경로에 문제가 있는 것으로 추정.

해야 할 것

  1. src/context/ 관련 소스 코드 분석 (aggregator, store)
  2. L6_DAILY aggregation 로직이 total_pnl을 정상적으로 계산·저장하는지 확인
  3. 테스트 또는 소스 코드 수정
  4. pytest -v --cov=src 전체 통과 확인

테스트 현황

  • 전체: 488 tests
  • 통과: 487 passed
  • 실패: 1 failed
## 현상 `pytest` 실행 시 1건의 테스트가 실패합니다. **실패 테스트:** `tests/test_context.py::TestContextAggregator::test_run_all_aggregations` ``` tests/test_context.py:302: in test_run_all_aggregations assert store.get_context(ContextLayer.L6_DAILY, date, "total_pnl") == 1000.0 E AssertionError: assert None == 1000.0 ``` ## 원인 분석 `ContextAggregator.run_all_aggregations()`가 L6_DAILY 레이어에 `total_pnl` 값을 제대로 저장하지 못하고 있음. `get_context()`가 `None`을 반환하므로 aggregation 로직 또는 store 저장 경로에 문제가 있는 것으로 추정. ## 해야 할 것 1. `src/context/` 관련 소스 코드 분석 (aggregator, store) 2. L6_DAILY aggregation 로직이 `total_pnl`을 정상적으로 계산·저장하는지 확인 3. 테스트 또는 소스 코드 수정 4. `pytest -v --cov=src` 전체 통과 확인 ## 테스트 현황 - 전체: 488 tests - 통과: 487 passed - 실패: 1 failed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jihoson/The-Ouroboros#112