Skip to content

Commit

Permalink
fix: 3.8 test
Browse files Browse the repository at this point in the history
  • Loading branch information
syu-w committed Apr 9, 2024
1 parent ceca23e commit 0aca67a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def test_grammar_strlist_error(value):
class GrammarValidation(pydantic.BaseModel):
"""Test validation of grammar-enabled types."""

x: GrammarType[list[str]]
x: GrammarType[List[str]]

with pytest.raises(pydantic.ValidationError) as raised:
GrammarValidation(x=value) # type: ignore
Expand Down Expand Up @@ -388,7 +388,7 @@ def test_grammar_strlist_elsefail():
class GrammarValidation(pydantic.BaseModel):
"""Test validation of grammar-enabled types."""

x: GrammarType[list[str]]
x: GrammarType[List[str]]

GrammarValidation(x=[{"on arch": ["foo"]}, "else fail"]) # type: ignore

Expand Down

0 comments on commit 0aca67a

Please sign in to comment.