File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 1- """
2- Tests to ensure that the SQLModel `Field` constructor works as
3- expected from the Pydantic `Field` function.
4- """
5- import sys
61from decimal import Decimal
72from typing import List , Optional , Union
83
94import pytest
105from pydantic import ValidationError
116from sqlmodel import Field , SQLModel
7+ from typing_extensions import Literal
128
139
1410def test_decimal ():
@@ -36,12 +32,7 @@ class Model(SQLModel):
3632 Model (unique_strings = ["x" , "y" , "x" ])
3733
3834
39- @pytest .mark .skipif (
40- sys .version_info < (3 , 8 ), reason = "requires Python 3.8+ (for `typing.Literal`)"
41- )
4235def test_discriminator ():
43- from typing import Literal
44-
4536 # Example adapted from
4637 # [Pydantic docs](https://pydantic-docs.helpmanual.io/usage/types/#discriminated-unions-aka-tagged-unions):
4738
You can’t perform that action at this time.
0 commit comments