Skip to content

Commit 6155dbd

Browse files
committed
Extend test
1 parent cf3486f commit 6155dbd

File tree

10 files changed

+21
-19
lines changed

10 files changed

+21
-19
lines changed

conformance/results/mypy/specialtypes_promotions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
conformant = "Pass"
22
output = """
3-
specialtypes_promotions.py:15: error: "float" has no attribute "numerator" [attr-defined]
4-
specialtypes_promotions.py:27: error: Incompatible return value type (got "complex", expected "float") [return-value]
3+
specialtypes_promotions.py:17: error: "float" has no attribute "numerator" [attr-defined]
4+
specialtypes_promotions.py:29: error: Incompatible return value type (got "complex", expected "float") [return-value]
55
"""
66
conformance_automated = "Pass"
77
errors_diff = """
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "mypy 1.10.0"
2-
test_duration = 1.2
2+
test_duration = 6.2

conformance/results/pyre/specialtypes_promotions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ notes = """
33
Does not reject use of attribute that is compatible only with float.
44
"""
55
output = """
6-
specialtypes_promotions.py:27:8 Incompatible return type [7]: Expected `float` but got `complex`.
6+
specialtypes_promotions.py:29:8 Incompatible return type [7]: Expected `float` but got `complex`.
77
"""
88
conformance_automated = "Fail"
99
errors_diff = """
10-
Line 15: Expected 1 errors
10+
Line 17: Expected 1 errors
1111
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pyre 0.9.21"
2-
test_duration = 2.3
2+
test_duration = 2.6

conformance/results/pyright/specialtypes_promotions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
conformant = "Pass"
22
output = """
3-
specialtypes_promotions.py:15:7 - error: Cannot access attribute "numerator" for class "float"
3+
specialtypes_promotions.py:17:7 - error: Cannot access attribute "numerator" for class "float"
44
  Attribute "numerator" is unknown (reportAttributeAccessIssue)
5-
specialtypes_promotions.py:27:16 - error: Expression of type "complex" is incompatible with return type "float"
5+
specialtypes_promotions.py:29:16 - error: Expression of type "complex" is incompatible with return type "float"
66
  "complex" is incompatible with "float" (reportReturnType)
77
"""
88
conformance_automated = "Pass"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pyright 1.1.364"
2-
test_duration = 1.3
2+
test_duration = 1.8

conformance/results/pytype/specialtypes_promotions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
conformant = "Pass"
22
output = """
3-
File "specialtypes_promotions.py", line 15, in func1: No attribute 'numerator' on float [attribute-error]
4-
File "specialtypes_promotions.py", line 27, in func2: bad return type [bad-return-type]
3+
File "specialtypes_promotions.py", line 17, in func1: No attribute 'numerator' on float [attribute-error]
4+
File "specialtypes_promotions.py", line 29, in func2: bad return type [bad-return-type]
55
"""
66
conformance_automated = "Pass"
77
errors_diff = """
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pytype 2024.04.11"
2-
test_duration = 27.3
2+
test_duration = 54.5

conformance/results/results.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,16 @@ <h3>Python Type System Conformance Test Results</h3>
159159
<div class="table_container"><table><tbody>
160160
<tr><th class="col1">&nbsp;</th>
161161
<th class='tc-header'><div class='tc-name'>mypy 1.10.0</div>
162-
<div class='tc-time'>1.2sec</div>
162+
<div class='tc-time'>6.2sec</div>
163163
</th>
164164
<th class='tc-header'><div class='tc-name'>pyright 1.1.364</div>
165-
<div class='tc-time'>1.3sec</div>
165+
<div class='tc-time'>1.8sec</div>
166166
</th>
167167
<th class='tc-header'><div class='tc-name'>pyre 0.9.21</div>
168-
<div class='tc-time'>2.3sec</div>
168+
<div class='tc-time'>2.6sec</div>
169169
</th>
170170
<th class='tc-header'><div class='tc-name'>pytype 2024.04.11</div>
171-
<div class='tc-time'>27.3sec</div>
171+
<div class='tc-time'>54.5sec</div>
172172
</th>
173173
</tr>
174174
<tr><th class="column" colspan="5">

conformance/tests/specialtypes_promotions.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66

77
# Specification: https://typing.readthedocs.io/en/latest/spec/special-types.html#special-cases-for-float-and-complex
88

9-
v1: float = 1
10-
v2: complex = 1.2
11-
v2 = 1
9+
v1: int = 1
10+
v2: float = 1
11+
v3: float = v1
12+
v4: complex = 1.2
13+
v4 = 1
1214

1315

1416
def func1(f: float):

0 commit comments

Comments
 (0)