Skip to content

Commit 5bd6def

Browse files
committed
Skip failing match statement test on 3.9
1 parent d7c35e4 commit 5bd6def

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

test-data/unit/check-python310.test

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2565,3 +2565,28 @@ def f1(x: int | str | list[bytes]) -> None:
25652565
case [y]:
25662566
reveal_type(y) # N: Revealed type is "builtins.bytes"
25672567
reveal_type(y) # N: Revealed type is "Union[builtins.str, builtins.bytes]"
2568+
2569+
[case testNewRedefineLoopWithMatch]
2570+
# flags: --allow-redefinition-new --local-partial-types
2571+
2572+
def f1() -> None:
2573+
while True:
2574+
x = object()
2575+
match x:
2576+
case str(y):
2577+
pass
2578+
case int():
2579+
pass
2580+
if int():
2581+
continue
2582+
2583+
def f2() -> None:
2584+
for x in [""]:
2585+
match str():
2586+
case "a":
2587+
y = ""
2588+
case "b":
2589+
y = 1
2590+
return
2591+
reveal_type(y) # N: Revealed type is "builtins.str"
2592+
[builtins fixtures/list.pyi]

test-data/unit/check-redefine2.test

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -671,31 +671,6 @@ def f2() -> None:
671671
y = ""
672672
[builtins fixtures/tuple.pyi]
673673

674-
[case testNewRedefineLoopWithMatch]
675-
# flags: --allow-redefinition-new --local-partial-types --python-version 3.10
676-
677-
def f1() -> None:
678-
while True:
679-
x = object()
680-
match x:
681-
case str(y):
682-
pass
683-
case int():
684-
pass
685-
if int():
686-
continue
687-
688-
def f2() -> None:
689-
for x in [""]:
690-
match str():
691-
case "a":
692-
y = ""
693-
case "b":
694-
y = 1
695-
return
696-
reveal_type(y) # N: Revealed type is "builtins.str"
697-
[builtins fixtures/list.pyi]
698-
699674
[case testNewRedefineReturn]
700675
# flags: --allow-redefinition-new --local-partial-types
701676
def f1() -> None:

0 commit comments

Comments
 (0)