PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
15.94k stars 1.56k forks source link

Controls time in the task engine cache tests to avoid flakes #14083

Closed chrisguidry closed 3 months ago

chrisguidry commented 3 months ago

This introduces a new advance_time fixture that allows for arbitrarily adjusting the return value of pendulum.now in tests. It's similar to its counterpart frozen_time, but the time will advance on its own with each call. The function returned by the fixture allows advancing time by a specified amount in tests.