Skip to content

Commit 2e28126

Browse files
committed
Adapt scheduler tests to time-machine 3 on v1.x.x
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
1 parent a421d1d commit 2e28126

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_dispatcher_scheduler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def event_loop_policy() -> async_solipsism.EventLoopPolicy:
3939

4040

4141
@fixture
42-
def fake_time() -> Iterator[time_machine.Coordinates]:
42+
def fake_time() -> Iterator[time_machine.Traveller]:
4343
"""Replace real time with a time machine that doesn't automatically tick."""
4444
with time_machine.travel(destination=0, tick=False) as traveller:
4545
yield traveller
@@ -90,7 +90,7 @@ def lifecycle_receiver(scheduler: DispatchScheduler) -> Receiver[DispatchEvent]:
9090

9191

9292
async def test_parallel_dispatches_same_window_and_follow_up_window(
93-
fake_time: time_machine.Coordinates,
93+
fake_time: time_machine.Traveller,
9494
generator: DispatchGenerator,
9595
microgrid_id: MicrogridId,
9696
client: FakeClient,
@@ -179,7 +179,7 @@ async def test_parallel_dispatches_same_window_and_follow_up_window(
179179

180180

181181
async def test_parallel_dispatches_with_payload_updates_before_start(
182-
fake_time: time_machine.Coordinates,
182+
fake_time: time_machine.Traveller,
183183
generator: DispatchGenerator,
184184
microgrid_id: MicrogridId,
185185
client: FakeClient,
@@ -249,7 +249,7 @@ async def test_parallel_dispatches_with_payload_updates_before_start(
249249

250250

251251
async def test_dispatch_payload_update_at_stop_boundary(
252-
fake_time: time_machine.Coordinates,
252+
fake_time: time_machine.Traveller,
253253
generator: DispatchGenerator,
254254
microgrid_id: MicrogridId,
255255
client: FakeClient,

0 commit comments

Comments
 (0)