FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sqlmodel/tests/test_sqlalchemy_type_errors.py at main · letsdeepchat/sqlmodel · GitHub
letsdeepchat
sqlmodel
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
sqlmodel
/
tests
/
test_sqlalchemy_type_errors.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (18 loc) · 720 Bytes
Breadcrumbs
sqlmodel
/
tests
/
test_sqlalchemy_type_errors.py
Copy path
File metadata and controls
28 lines (18 loc) · 720 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from
typing
import
Any
import
pytest
from
sqlmodel
import
Field
,
SQLModel
def
test_type_list_breaks
()
->
None
:
with
pytest
.
raises
(
ValueError
):
class
Hero
(
SQLModel
,
table
=
True
):
id
:
int
|
None
=
Field
(
default
=
None
,
primary_key
=
True
)
tags
:
list
[
str
]
def
test_type_dict_breaks
()
->
None
:
with
pytest
.
raises
(
ValueError
):
class
Hero
(
SQLModel
,
table
=
True
):
id
:
int
|
None
=
Field
(
default
=
None
,
primary_key
=
True
)
tags
:
dict
[
str
,
Any
]
def
test_type_union_breaks
()
->
None
:
with
pytest
.
raises
(
ValueError
):
class
Hero
(
SQLModel
,
table
=
True
):
id
:
int
|
None
=
Field
(
default
=
None
,
primary_key
=
True
)
tags
:
int
|
str
Back
|
FazBrowse Home
|
New Git URL