Skip to content

Commit 4590eaa

Browse files
committed
Removed usage of | for unions in tests (fails for 3.7-3.9)
1 parent c780d64 commit 4590eaa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/test_00_validate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def test_typevar() -> None:
383383
validate(None, IntT)
384384
with pytest.raises(TypeError):
385385
validate([0, 1], IntT)
386-
IntStrSeqT = typing.TypeVar("IntStrSeqT", bound=typing.Sequence[int|str])
386+
IntStrSeqT = typing.TypeVar("IntStrSeqT", bound=typing.Sequence[typing.Union[int,str]])
387387
validate([0, "hello"], IntStrSeqT)
388388
validate("Hello", IntStrSeqT)
389389
with pytest.raises(TypeError):

test/test_01_can_validate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,5 @@ def test_typevar() -> None:
109109
assert can_validate(T)
110110
IntT = typing.TypeVar("IntT", bound=int)
111111
assert can_validate(IntT)
112-
IntStrSeqT = typing.TypeVar("IntStrSeqT", bound=typing.Sequence[int|str])
112+
IntStrSeqT = typing.TypeVar("IntStrSeqT", bound=typing.Sequence[typing.Union[int,str]])
113113
assert can_validate(IntStrSeqT)

0 commit comments

Comments
 (0)