Skip to content

Investigate switching sqlmesh core from freezegun to time-machine #3522

@treysp

Description

@treysp

The freezegun library allows you to "freeze time" in Python, which is valuable for reproducibility in unit tests.

SQLMesh users can specify an execution time (or other datetime variable) in their SQLMesh tests. Core implements this functionality using freezegun.

freeezegun has limited support for timezone handling, but the time-machine library has full support. We switched the sqlmesh unit test suite to time-machine in #3516 for this reason.

That PR did not switch sqlmesh core to time-machine, but we will want to at some point. The actual change is simple, the real task will be understanding the implications for DuckDB interoperability, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ImprovementImproves existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions