Skip to content

Commit 25c2171

Browse files
committed
Add tests
1 parent 01b39d4 commit 25c2171

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tests/test_misc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ def test_is_pydantic_model():
1515
class Model(BaseModel):
1616
x: int
1717

18+
class ModelNone(BaseModel):
19+
x: int | None
20+
1821
assert is_pydantic_model(Model)
1922
assert is_pydantic_model("instance") is False
23+
assert is_pydantic_model(ModelNone)
2024

2125

2226
def test_client():

tests/test_models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class SomeModel(BaseModel):
99
i: int
1010
s: str
1111
f: float
12+
n: int | None = None
1213

1314

1415
class OtherModel(BaseModel):

0 commit comments

Comments
 (0)