We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5286627 commit 02b04c7Copy full SHA for 02b04c7
tests/test_utils.py
@@ -3,6 +3,7 @@
3
4
import pytest
5
6
+from geolib._compat import IS_PYDANTIC_V2
7
from geolib.models import BaseDataClass
8
from geolib.models.utils import get_filtered_type_hints, get_required_class_field
9
@@ -32,7 +33,10 @@ def test_given_class_when_get_required_class_field_then_only_valid_fields_return
32
33
assert len(filtered_types) == 1
34
field_name, field_type = filtered_types[0]
35
assert field_name == "regular_field"
- assert field_type == int
36
+ if IS_PYDANTIC_V2:
37
+ assert field_type.annotation == int
38
+ else:
39
+ assert field_type.type_ == int
40
41
@pytest.mark.unittest
42
@pytest.mark.parametrize(
0 commit comments