Skip to content

Commit 470e813

Browse files
committed
♻️ Import from typing_extensions to support Python 3.7
1 parent 5ff6d2a commit 470e813

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

tests/test_pydantic/test_field.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
"""
2-
Tests to ensure that the SQLModel `Field` constructor works as
3-
expected from the Pydantic `Field` function.
4-
"""
5-
import sys
61
from decimal import Decimal
72
from typing import List, Optional, Union
83

94
import pytest
105
from pydantic import ValidationError
116
from sqlmodel import Field, SQLModel
7+
from typing_extensions import Literal
128

139

1410
def 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-
)
4235
def 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

0 commit comments

Comments
 (0)