Skip to content

Commit e8852e1

Browse files
committed
split up typing tests
1 parent 050ac3c commit e8852e1

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

pydra/utils/tests/test_typing.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,12 @@ def test_type_check_nested6():
156156

157157

158158
def test_type_check_nested7():
159+
TypeParser(ty.Tuple[float, float, float])(lz(ty.List[int]))
160+
161+
162+
def test_type_check_nested7a():
159163
with pytest.raises(TypeError, match="Wrong number of type arguments"):
160-
TypeParser(ty.Tuple[float, float, float])(lz(ty.List[int]))
164+
TypeParser(ty.Tuple[float, float, float])(lz(ty.Tuple[int]))
161165

162166

163167
def test_type_check_nested8():
@@ -506,14 +510,29 @@ def test_matches_type_tuple():
506510
assert not TypeParser.matches_type(ty.Tuple[int], ty.Tuple[int, int])
507511

508512

509-
def test_matches_type_tuple_ellipsis():
513+
def test_matches_type_tuple_ellipsis1():
510514
assert TypeParser.matches_type(ty.Tuple[int], ty.Tuple[int, ...])
515+
516+
517+
def test_matches_type_tuple_ellipsis2():
511518
assert TypeParser.matches_type(ty.Tuple[int, int], ty.Tuple[int, ...])
519+
520+
521+
def test_matches_type_tuple_ellipsis3():
512522
assert not TypeParser.matches_type(ty.Tuple[int, float], ty.Tuple[int, ...])
523+
524+
525+
def test_matches_type_tuple_ellipsis4():
513526
assert not TypeParser.matches_type(ty.Tuple[int, ...], ty.Tuple[int])
527+
528+
529+
def test_matches_type_tuple_ellipsis5():
514530
assert TypeParser.matches_type(
515531
ty.Tuple[int], ty.List[int], coercible=[(tuple, list)]
516532
)
533+
534+
535+
def test_matches_type_tuple_ellipsis6():
517536
assert TypeParser.matches_type(
518537
ty.Tuple[int, ...], ty.List[int], coercible=[(tuple, list)]
519538
)

0 commit comments

Comments
 (0)