Skip to content

Commit

Permalink
tests: python 3.8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
guacs committed Oct 14, 2023
1 parent c869fe3 commit d9934d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_collection_length.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Dict, List, Set, Tuple
from typing import Dict, List, Optional, Set, Tuple

import pytest
from pydantic.dataclasses import dataclass
Expand Down Expand Up @@ -68,7 +68,7 @@ class FooFactory(DataclassFactory[Foo]):
def test_collection_length_with_optional_not_allowed(min_val: int, max_val: int) -> None:
@dataclass
class Foo:
foo: List[int] | None
foo: Optional[List[int]]

class FooFactory(DataclassFactory[Foo]):
__model__ = Foo
Expand All @@ -89,7 +89,7 @@ class FooFactory(DataclassFactory[Foo]):
def test_collection_length_with_optional_allowed(min_val: int, max_val: int) -> None:
@dataclass
class Foo:
foo: List[int] | None
foo: Optional[list[int]]

class FooFactory(DataclassFactory[Foo]):
__model__ = Foo
Expand Down

0 comments on commit d9934d4

Please sign in to comment.