@@ -112,7 +112,9 @@ def test_forward_only_plan_with_effective_date(context_fixture: Context, request
112112
113113 plan_builder = context .plan_builder ("dev" , skip_tests = True , forward_only = True )
114114 plan = plan_builder .build ()
115- assert len (plan .new_snapshots ) == 3 # waiter_revenue_by_day, top_waiters, and audit_waiter_revenue_anomalies
115+ assert (
116+ len (plan .new_snapshots ) == 3
117+ ) # waiter_revenue_by_day, top_waiters, and audit_waiter_revenue_anomalies
116118 assert (
117119 plan .context_diff .snapshots [snapshot .snapshot_id ].change_category
118120 == SnapshotChangeCategory .NON_BREAKING
@@ -140,16 +142,18 @@ def test_forward_only_plan_with_effective_date(context_fixture: Context, request
140142 (to_timestamp ("2023-01-06" ), to_timestamp ("2023-01-07" )),
141143 (to_timestamp ("2023-01-07" ), to_timestamp ("2023-01-08" )),
142144 ]
143-
145+
144146 expected_snapshot_ids = {top_waiters_snapshot .snapshot_id , snapshot .snapshot_id }
145147 # Also include audit_waiter_revenue_anomalies if it exists
146148 if context .get_snapshot ("sushi.audit_waiter_revenue_anomalies" , raise_if_missing = False ):
147- audit_snapshot = context .get_snapshot ("sushi.audit_waiter_revenue_anomalies" , raise_if_missing = True )
149+ audit_snapshot = context .get_snapshot (
150+ "sushi.audit_waiter_revenue_anomalies" , raise_if_missing = True
151+ )
148152 expected_snapshot_ids .add (audit_snapshot .snapshot_id )
149-
153+
150154 actual_snapshot_ids = {si .snapshot_id for si in plan .missing_intervals }
151155 assert actual_snapshot_ids == expected_snapshot_ids
152-
156+
153157 # Check that all have the same intervals
154158 for si in plan .missing_intervals :
155159 assert si .intervals == expected_intervals
@@ -160,21 +164,21 @@ def test_forward_only_plan_with_effective_date(context_fixture: Context, request
160164 (to_timestamp ("2023-01-06" ), to_timestamp ("2023-01-07" )),
161165 (to_timestamp ("2023-01-07" ), to_timestamp ("2023-01-08" )),
162166 ]
163-
167+
164168 actual_snapshot_ids = {si .snapshot_id for si in plan .missing_intervals }
165169 assert actual_snapshot_ids == expected_snapshot_ids
166-
170+
167171 # Check that all have the same intervals
168172 for si in plan .missing_intervals :
169173 assert si .intervals == expected_intervals_2
170174
171175 plan = plan_builder .set_effective_from ("2023-01-04" ).build ()
172176 # Start should remain unchanged
173177 assert plan .start == "2023-01-06"
174-
178+
175179 actual_snapshot_ids = {si .snapshot_id for si in plan .missing_intervals }
176180 assert actual_snapshot_ids == expected_snapshot_ids
177-
181+
178182 # Check that all have the same intervals (should still be intervals_2)
179183 for si in plan .missing_intervals :
180184 assert si .intervals == expected_intervals_2
@@ -192,17 +196,17 @@ def test_forward_only_plan_with_effective_date(context_fixture: Context, request
192196 prod_plan = context .plan_builder (skip_tests = True ).build ()
193197 # Make sure that the previously set effective_from is respected
194198 assert prod_plan .start == to_timestamp ("2023-01-04" )
195-
199+
196200 expected_prod_intervals = [
197201 (to_timestamp ("2023-01-04" ), to_timestamp ("2023-01-05" )),
198202 (to_timestamp ("2023-01-05" ), to_timestamp ("2023-01-06" )),
199203 (to_timestamp ("2023-01-06" ), to_timestamp ("2023-01-07" )),
200204 (to_timestamp ("2023-01-07" ), to_timestamp ("2023-01-08" )),
201205 ]
202-
206+
203207 actual_prod_snapshot_ids = {si .snapshot_id for si in prod_plan .missing_intervals }
204208 assert actual_prod_snapshot_ids == expected_snapshot_ids
205-
209+
206210 # Check that all have the same intervals
207211 for si in prod_plan .missing_intervals :
208212 assert si .intervals == expected_prod_intervals
0 commit comments