Skip to content

Commit 1b70460

Browse files
committed
Fix incorrect test
1 parent b88deda commit 1b70460

File tree

6 files changed

+7
-15
lines changed

6 files changed

+7
-15
lines changed
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
conformant = "Pass"
22
output = """
33
generics_typevartuple_callable.py:26: error: Argument "target" to "Process" has incompatible type "Callable[[int, str], None]"; expected "Callable[[str, int], None]" [arg-type]
4-
generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type]
54
"""
6-
conformance_automated = "Fail"
5+
conformance_automated = "Pass"
76
errors_diff = """
8-
Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type]']
97
"""
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
conformant = "Pass"
2-
conformance_automated = "Fail"
2+
conformance_automated = "Pass"
33
errors_diff = """
4-
Line 50: Unexpected errors ['assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type]']
54
"""
65
output = """
76
ERROR generics_typevartuple_callable.py:26:28-35: Argument `tuple[Literal[''], Literal[0]]` is not assignable to parameter `args` with type `tuple[int, str]` in function `Process.__init__` [bad-argument-type]
8-
ERROR generics_typevartuple_callable.py:50:16-63: assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type]
97
"""

conformance/results/pyright/generics_typevartuple_callable.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ output = """
33
generics_typevartuple_callable.py:26:28 - error: Argument of type "tuple[Literal[''], Literal[0]]" cannot be assigned to parameter "args" of type "tuple[*Ts@__init__]" in function "__init__"
44
  "Literal['']" is not assignable to "int"
55
  "Literal[0]" is not assignable to "str" (reportArgumentType)
6-
generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure)
76
"""
8-
conformance_automated = "Fail"
7+
conformance_automated = "Pass"
98
errors_diff = """
10-
Line 50: Unexpected errors ['generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure)']
119
"""

conformance/results/results.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ <h3>Python Type System Conformance Test Results</h3>
385385
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_typevartuple_callable</th>
386386
<th class="column col2 conformant">Pass</th>
387387
<th class="column col2 conformant">Pass</th>
388-
<th class="column col2 not-conformant">Unknown</th>
388+
<th class="column col2 conformant">Pass</th>
389389
<th class="column col2 conformant">Pass</th>
390390
</tr>
391391
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_typevartuple_concat</th>
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
22
errors_diff = """
3-
Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc]']
43
"""
54
output = """
65
generics_typevartuple_callable.py:26: error: Argument "args" to "Process" has incompatible type "tuple[str, int]"; expected "tuple[int, str]" [arg-type]
7-
generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc]
86
"""

conformance/tests/generics_typevartuple_callable.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ def callback2(a: int, d: str) -> tuple[str]:
4242
assert_type(func2(callback2), tuple[str])
4343

4444

45-
def func3(*args: * tuple[int, *Ts, T]) -> tuple[T, *Ts]:
45+
def func3(*args: *tuple[int, *Ts, T]) -> tuple[T, *Ts]:
4646
raise NotImplementedError
4747

4848

4949
def has_int_and_str(a: int, b: str, c: float, d: complex):
50-
assert_type(func3(a, b, c, d), tuple[float, str, complex])
50+
assert_type(func3(a, b, c, d), tuple[complex, str, float])

0 commit comments

Comments
 (0)