Skip to content

Commit 89bedc0

Browse files
authored
Fix: Support latest Pydantic V2 version in tests (#1325)
1 parent e59ca69 commit 89bedc0

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

tests/schedulers/airflow/operators/test_targets.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
from sqlmesh.core.snapshot import SnapshotChangeCategory
1313
from sqlmesh.engines import commands
1414
from sqlmesh.schedulers.airflow.operators import targets
15-
from sqlmesh.utils.date import to_date, to_datetime
16-
from sqlmesh.utils.pydantic import PYDANTIC_MAJOR_VERSION
15+
from sqlmesh.utils.date import to_datetime
1716

1817

1918
@pytest.fixture
@@ -55,11 +54,6 @@ def test_evaluation_target_execute(mocker: MockerFixture, make_snapshot: t.Calla
5554

5655
add_interval_mock.assert_called_once_with(snapshot, interval_ds, interval_ds, is_dev=False)
5756

58-
if PYDANTIC_MAJOR_VERSION >= 2:
59-
# FIXME: https://github.com/pydantic/pydantic/issues/7039
60-
interval_ds = to_date(interval_ds)
61-
logical_ds = to_date(logical_ds)
62-
6357
evaluator_evaluate_mock.assert_called_once_with(
6458
snapshot,
6559
interval_ds,
@@ -113,11 +107,6 @@ def test_evaluation_target_execute_seed_model(mocker: MockerFixture, make_snapsh
113107

114108
get_snapshots_mock.assert_called_once_with([snapshot], hydrate_seeds=True)
115109

116-
if PYDANTIC_MAJOR_VERSION >= 2:
117-
# FIXME: https://github.com/pydantic/pydantic/issues/7039
118-
interval_ds = to_date(interval_ds)
119-
logical_ds = to_date(logical_ds)
120-
121110
evaluator_evaluate_mock.assert_called_once_with(
122111
snapshot,
123112
interval_ds,

0 commit comments

Comments
 (0)