test(HEL-479): scope revision-review batch assertions to A-group boundary for HEL-463 integration
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -151,7 +151,19 @@ class RevisionReviewTests(unittest.TestCase):
|
|||||||
return None if row is None else row["turnover_rate"]
|
return None if row is None else row["turnover_rate"]
|
||||||
|
|
||||||
def _batch_ids(self, db: HubDB, day: str) -> set[str]:
|
def _batch_ids(self, db: HubDB, day: str) -> set[str]:
|
||||||
return {str(row["batch_id"]) for row in db.fetchall("SELECT batch_id FROM batches WHERE trade_date=?", (day,))}
|
# HEL-478/HEL-463 integration: extended soft datasets (limit_events,
|
||||||
|
# dragon_tiger, sector_daily, popularity) publish on their own schedule
|
||||||
|
# inside the same tick and are outside the valuation review boundary.
|
||||||
|
# Scope assertions to the A-group + stocks boundary the review republishes.
|
||||||
|
boundary = ("daily", "valuation", "moneyflow", "auction", "stocks")
|
||||||
|
placeholders = ",".join("?" for _ in boundary)
|
||||||
|
return {
|
||||||
|
str(row["batch_id"])
|
||||||
|
for row in db.fetchall(
|
||||||
|
f"SELECT batch_id FROM batches WHERE trade_date=? AND dataset IN ({placeholders})",
|
||||||
|
(day, *boundary),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
def test_no_change_does_not_create_a_new_batch(self) -> None:
|
def test_no_change_does_not_create_a_new_batch(self) -> None:
|
||||||
tmp, db, transport, pipe, sched = make_revision_env()
|
tmp, db, transport, pipe, sched = make_revision_env()
|
||||||
|
|||||||
Reference in New Issue
Block a user