Skip to content

Commit 9a0c172

Browse files
committed
Fix pydantic v2 tests
1 parent 8c45261 commit 9a0c172

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/test_advanced/test_column_types/test_tutorial002.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
import pytest
44
from sqlmodel import create_engine
55

6-
from ...conftest import get_testing_print_function
6+
from ...conftest import get_testing_print_function, needs_pydanticv2
77

88
expected_calls = [
99
["Average score:", pytest.approx(0.5079, abs=0.0001)],
1010
]
1111

1212

13+
@needs_pydanticv2
1314
def test_tutorial(clear_sqlmodel):
1415
from docs_src.advanced.column_types import tutorial002 as mod
1516

tests/test_advanced/test_column_types/test_tutorial003.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from sqlmodel import create_engine
44

5-
from ...conftest import get_testing_print_function
5+
from ...conftest import get_testing_print_function, needs_pydanticv2
66

77
expected_calls = [
88
[
@@ -19,6 +19,7 @@
1919
]
2020

2121

22+
@needs_pydanticv2
2223
def test_tutorial(clear_sqlmodel):
2324
from docs_src.advanced.column_types import tutorial003 as mod
2425

0 commit comments

Comments
 (0)