Skip to content

Commit 392353c

Browse files
Conformance test suite: Fix automation discrepancies in directives_version_platform (#1685)
1 parent f14091a commit 392353c

File tree

4 files changed

+6
-15
lines changed

4 files changed

+6
-15
lines changed

conformance/results/mypy/directives_version_platform.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ directives_version_platform.py:27: error: Incompatible types in assignment (expr
99
directives_version_platform.py:40: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]
1010
directives_version_platform.py:45: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]
1111
"""
12-
conformance_automated = "Fail"
12+
conformance_automated = "Pass"
1313
errors_diff = """
14-
Line 19: Unexpected errors ['directives_version_platform.py:19: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]']
15-
Line 27: Unexpected errors ['directives_version_platform.py:27: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]']
16-
Line 40: Unexpected errors ['directives_version_platform.py:40: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]']
17-
Line 45: Unexpected errors ['directives_version_platform.py:45: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]']
1814
"""

conformance/results/pyre/directives_version_platform.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ conformance_automated = "Fail"
1313
errors_diff = """
1414
Line 31: Unexpected errors ['directives_version_platform.py:31:4 Incompatible variable type [9]: val5 is declared to have type `int` but is used as type `str`.']
1515
Line 36: Unexpected errors ['directives_version_platform.py:36:4 Incompatible variable type [9]: val6 is declared to have type `int` but is used as type `str`.']
16-
Line 40: Unexpected errors ['directives_version_platform.py:40:4 Incompatible variable type [9]: val7 is declared to have type `int` but is used as type `str`.']
17-
Line 45: Unexpected errors ['directives_version_platform.py:45:4 Incompatible variable type [9]: val8 is declared to have type `int` but is used as type `str`.']
1816
"""

conformance/results/pytype/directives_version_platform.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ File "directives_version_platform.py", line 27, in <module>: Type annotation for
88
File "directives_version_platform.py", line 40, in <module>: Type annotation for val7 does not match type of assignment [annotation-type-mismatch]
99
File "directives_version_platform.py", line 45, in <module>: Type annotation for val8 does not match type of assignment [annotation-type-mismatch]
1010
"""
11-
conformance_automated = "Fail"
11+
conformance_automated = "Pass"
1212
errors_diff = """
13-
Line 27: Unexpected errors ['File "directives_version_platform.py", line 27, in <module>: Type annotation for val3 does not match type of assignment [annotation-type-mismatch]']
14-
Line 40: Unexpected errors ['File "directives_version_platform.py", line 40, in <module>: Type annotation for val7 does not match type of assignment [annotation-type-mismatch]']
15-
Line 45: Unexpected errors ['File "directives_version_platform.py", line 45, in <module>: Type annotation for val8 does not match type of assignment [annotation-type-mismatch]']
1613
"""

conformance/tests/directives_version_platform.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
if sys.version_info >= (3, 8, 0):
1717
pass
1818
else:
19-
val2: int = "" # Should not generate an error
19+
val2: int = "" # E?: May not generate an error (support for three-element sys.version is optional)
2020

2121
if sys.version_info < (3, 8):
2222
val3: int = "" # Should not generate an error
2323

2424
if sys.version_info < (3, 100, 0):
2525
pass
2626
else:
27-
val3: int = "" # Should not generate an error
27+
val3: int = "" # E?: May not generate an error (support for three-element sys.version is optional)
2828

2929

3030
if sys.platform == "bogus_platform":
@@ -37,9 +37,9 @@
3737

3838

3939
if os.name == "bogus_os":
40-
val7: int = "" # Should not generate an error
40+
val7: int = "" # E?: May not generate an error (support for os.name is optional)
4141

4242
if os.name != "bogus_platform":
4343
pass
4444
else:
45-
val8: int = "" # Should not generate an error
45+
val8: int = "" # E?: May not generate an error (support for os.name is optional)

0 commit comments

Comments
 (0)