Skip to content

Commit 5677ba6

Browse files
conformance: make TypeVarTuple test not depend on TypeVar inference behavior (#2234)
1 parent 7e32d48 commit 5677ba6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
conformance_automated = "Fail"
22
conformant = "Unsupported"
33
errors_diff = """
4-
Line 52: Unexpected errors ['generics_typevartuple_concat.py:52:1: error[type-assertion-failure] Type `tuple[@Todo(TypeVarTuple), ...]` does not match asserted type `tuple[int, bool, str]`']
4+
Line 53: Unexpected errors ['generics_typevartuple_concat.py:53:5: error[type-assertion-failure] Type `tuple[@Todo(TypeVarTuple), ...]` does not match asserted type `tuple[int, bool, str]`']
55
"""
66
output = """
7-
generics_typevartuple_concat.py:52:1: error[type-assertion-failure] Type `tuple[@Todo(TypeVarTuple), ...]` does not match asserted type `tuple[int, bool, str]`
7+
generics_typevartuple_concat.py:53:5: error[type-assertion-failure] Type `tuple[@Todo(TypeVarTuple), ...]` does not match asserted type `tuple[int, bool, str]`
88
"""

conformance/tests/generics_typevartuple_concat.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ def prefix_tuple(x: T, y: tuple[*Ts]) -> tuple[T, *Ts]:
4848
raise NotImplementedError
4949

5050

51-
z = prefix_tuple(x=0, y=(True, "a"))
52-
assert_type(z, tuple[int, bool, str])
51+
def call_prefix_tuple(x: int, y: bool, z: str):
52+
result = prefix_tuple(x=x, y=(y, z))
53+
assert_type(result, tuple[int, bool, str])
5354

5455

5556
def move_first_element_to_last(tup: tuple[T, *Ts]) -> tuple[*Ts, T]:

0 commit comments

Comments
 (0)