Skip to content

Commit

Permalink
Fix tests for Python < 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
aranega committed Nov 3, 2024
1 parent b6540a6 commit ea5aa3f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_sequence_matchers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from dataclasses import dataclass
from typing import List, Union
import pytest

from iguala import as_matcher, is_not, match
Expand Down Expand Up @@ -109,8 +110,8 @@ def test_sequence_matcher_generator():
@dataclass
class A:
x: int
y: int | str
tab: list[int | str]
y: Union[int, str]
tab: List[Union[int, str]]

def i_element_after(i, x, var):
return as_matcher([..., x, *["@_"]*i, f"@{var}", ...])
Expand All @@ -133,7 +134,7 @@ def test_matcher_generator_iterate_list():
@dataclass
class A:
x: int
tab: list[int | str]
tab: List[Union[int, str]]

a = A(x=3, tab=[3, 4, "r", 3, 3, 5, 6, "r", 1, 2, 8])

Expand All @@ -152,7 +153,7 @@ def test_matcher_generator_save_nodes():
@dataclass
class A:
x: int
tab: list[int | str]
tab: List[Union[int, str]]

a = A(x=3, tab=[3, 4, "r", 3, 3, 5, 6, "r", 1, 2, 8])

Expand Down

0 comments on commit ea5aa3f

Please sign in to comment.