Skip to content

Commit 4025826

Browse files
Conformance tests: mark pytype as failing assert_type test (#1706)
It does not produce an error for `x: Literal[4]; assert_type(x, int)`. Part of #1692
1 parent d61944d commit 4025826

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

conformance/results/pytype/directives_assert_type.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
conformant = "Pass"
1+
conformant = "Partial"
2+
notes = """
3+
Incorrectly allows assert(x, int) where x is a Literal.
4+
"""
25
output = """
36
File "directives_assert_type.py", line 27, in func1: Union[int, str] [assert-type]
47
File "directives_assert_type.py", line 28, in func1: Any [assert-type]

conformance/results/results.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ <h3>Python Type System Conformance Test Results</h3>
859859
<th class="column col2 conformant">Pass</th>
860860
<th class="column col2 conformant">Pass</th>
861861
<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>
862-
<th class="column col2 conformant">Pass</th>
862+
<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>
863863
</tr>
864864
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directives_cast</th>
865865
<th class="column col2 conformant">Pass</th>

0 commit comments

Comments
 (0)