Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rescope lineage cache in tests #3132

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from sqlmesh.core.engine_adapter import SparkEngineAdapter
from sqlmesh.core.engine_adapter.base import EngineAdapter
from sqlmesh.core.environment import EnvironmentNamingInfo
from sqlmesh.core import lineage
from sqlmesh.core.macros import macro
from sqlmesh.core.model import IncrementalByTimeRangeKind, SqlModel, model
from sqlmesh.core.model.kind import OnDestructiveChange
Expand Down Expand Up @@ -222,6 +223,12 @@ def rescope_log_handlers():
yield


@pytest.fixture(scope="function", autouse=True)
def rescope_lineage_cache(request):
lineage.CACHE.clear()
yield


@pytest.fixture
def duck_conn() -> duckdb.DuckDBPyConnection:
return duckdb.connect()
Expand Down