Skip to content

Commit 9076de0

Browse files
committed
Limit dict-with-bad-type-args test to 3.10+
1 parent 3f11b80 commit 9076de0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_attribute_keyed_dict.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import re
2+
import sys
23
from enum import Enum
34
from typing import Dict, Optional
45

@@ -47,6 +48,9 @@ class Parent(SQLModel, table=True):
4748
assert parent.children_by_color[Color.Blue].value == 2
4849

4950

51+
# typing.Dict throws if it receives the wrong number of type arguments, but
52+
# dict (3.10+) does not.
53+
@pytest.skipif(sys.version_info < 3.10)
5054
def test_dict_relationship_throws_on_missing_annotation_arg(clear_sqlmodel):
5155
class Color(str, Enum):
5256
Orange = "Orange"

0 commit comments

Comments
 (0)