Skip to content

Commit

Permalink
Conformance tests: mark pytype as failing assert_type test
Browse files Browse the repository at this point in the history
It does not produce an error for `x: Literal[4]; assert_type(x, int)`.

Part of python#1692
  • Loading branch information
JelleZijlstra committed Apr 9, 2024
1 parent d61944d commit 5d5bd1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion conformance/results/pytype/directives_assert_type.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
conformant = "Pass"
conformant = "Partial"
notes = """
Incorrectly allows assert(x, int) where x is a Literal.
"""
output = """
File "directives_assert_type.py", line 27, in func1: Union[int, str] [assert-type]
File "directives_assert_type.py", line 28, in func1: Any [assert-type]
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ <h3>Python Type System Conformance Test Results</h3>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 not-conformant"><div class="hover-text">Unsupported<span class="tooltip-text" id="bottom"><p>Does not understand "assert_type".</p></span></div></th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Incorrectly allows assert(x, int) where x is a Literal.</p></span></div></th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directives_cast</th>
<th class="column col2 conformant">Pass</th>
Expand Down

0 comments on commit 5d5bd1f

Please sign in to comment.