Skip to content

Commit

Permalink
Use 'typing.Tuple' instead of 'tuple' in test for version compat.
Browse files Browse the repository at this point in the history
  • Loading branch information
daveraja committed Mar 2, 2024
1 parent adc3031 commit 3754ac0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_forward_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,11 @@ class P2(Predicate):
def test_postponed_annotations_headlist(self):
code = """
from __future__ import annotations
from typing import Tuple
from clorm import Predicate, HeadList
class P(Predicate):
x: HeadList[tuple[int,str]]
x: HeadList[Tuple[int,str]]
"""
with self._create_module(code) as module:
p = module.P(x=((1, "a"), (2, "b")))
Expand All @@ -293,10 +294,11 @@ class P(Predicate):
def test_postponed_annotations_flatlist(self):
code = """
from __future__ import annotations
from typing import Tuple
from clorm import Predicate
class P(Predicate):
x: tuple[tuple[int,str], ...]
x: Tuple[Tuple[int,str], ...]
"""
with self._create_module(code) as module:
p = module.P(x=((1, "a"), (2, "b")))
Expand Down

0 comments on commit 3754ac0

Please sign in to comment.