From 4025826d6ad671f288c4d03c638425547e9f1612 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 9 Apr 2024 14:04:39 -0400 Subject: [PATCH] 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 --- conformance/results/pytype/directives_assert_type.toml | 5 ++++- conformance/results/results.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/conformance/results/pytype/directives_assert_type.toml b/conformance/results/pytype/directives_assert_type.toml index ddf57fb4d..a77a3f9ec 100644 --- a/conformance/results/pytype/directives_assert_type.toml +++ b/conformance/results/pytype/directives_assert_type.toml @@ -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] diff --git a/conformance/results/results.html b/conformance/results/results.html index 9eaa2a212..b10f72c36 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -859,7 +859,7 @@

Python Type System Conformance Test Results

Pass Pass
Unsupported

Does not understand "assert_type".

-Pass +
Partial

Incorrectly allows assert(x, int) where x is a Literal.

     directives_cast Pass