@@ -304,7 +304,7 @@ def test_literal(self) -> None:
304
304
self .assert_subtype (str1_inst , str1 )
305
305
self .assert_subtype (str1_inst , str1_inst )
306
306
307
- # second operand is a different literal
307
+ # other operand is a different literal
308
308
# "x" ≲ "y" -> NO
309
309
# "x" ≲ "y"? -> YES
310
310
# "x"? ≲ "y" -> NO
@@ -315,17 +315,17 @@ def test_literal(self) -> None:
315
315
self .assert_subtype (str1_inst , str2_inst )
316
316
317
317
# check proper subtyping
318
- # second operand is the fallback type
318
+ # other operand is the fallback type
319
319
# "x" <: str -> YES
320
320
# str <: "x" -> NO
321
321
# "x"? <: str -> YES
322
- # str <: "x"? -> YES
322
+ # str <: "x"? -> NO
323
323
self .assert_proper_subtype (str1 , str_type )
324
324
self .assert_not_proper_subtype (str_type , str1 )
325
325
self .assert_proper_subtype (str1_inst , str_type )
326
- self .assert_proper_subtype (str_type , str1_inst )
326
+ self .assert_not_proper_subtype (str_type , str1_inst )
327
327
328
- # second operand is the same literal
328
+ # other operand is the same literal
329
329
# "x" <: "x" -> YES
330
330
# "x" <: "x"? -> YES
331
331
# "x"? <: "x" -> NO
@@ -335,15 +335,15 @@ def test_literal(self) -> None:
335
335
self .assert_not_proper_subtype (str1_inst , str1 )
336
336
self .assert_proper_subtype (str1_inst , str1_inst )
337
337
338
- # second operand is a different literal
339
- # "x" ≲ "y" -> NO
340
- # "x" ≲ "y"? -> NO
341
- # "x"? ≲ "y" -> NO
342
- # "x"? ≲ "y"? -> YES
338
+ # other operand is a different literal
339
+ # "x" <: "y" -> NO
340
+ # "x" <: "y"? -> NO
341
+ # "x"? <: "y" -> NO
342
+ # "x"? <: "y"? -> NO
343
343
self .assert_not_proper_subtype (str1 , str2 )
344
344
self .assert_not_proper_subtype (str1 , str2_inst )
345
345
self .assert_not_proper_subtype (str1_inst , str2 )
346
- self .assert_proper_subtype (str1_inst , str2_inst )
346
+ self .assert_not_proper_subtype (str1_inst , str2_inst )
347
347
348
348
# IDEA: Maybe add these test cases (they are tested pretty well in type
349
349
# checker tests already):
0 commit comments