feat(lotto): point_in_time_draws 헬퍼
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -60,6 +60,14 @@ def test_random_null_and_coverage_distinct():
|
||||
assert len(flat) >= 40 # 커버리지 전략은 번호를 넓게 퍼뜨림
|
||||
|
||||
|
||||
def test_point_in_time_excludes_target_draw():
|
||||
draws = _toy_draws(50) # drw_no 1..50
|
||||
pit = bt.point_in_time_draws(draws, target_draw_no=30)
|
||||
assert all(d < 30 for d, _ in pit) # 30 이상 제외
|
||||
assert max(d for d, _ in pit) == 29
|
||||
assert len(pit) == 29
|
||||
|
||||
|
||||
def test_generate_pool_partial_fill(monkeypatch):
|
||||
"""weighted_sample_6이 항상 같은 조합만 반환하도록 패치 → cap에 먼저 걸려 len < n — 예외 없이 반환."""
|
||||
import random as _r
|
||||
|
||||
Reference in New Issue
Block a user