Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
Update tests
  • Loading branch information
JukkaL committed Apr 20, 2026
commit f1e6d7db66e85d6d70d93bc6a1684f9e4c029bc1
2 changes: 1 addition & 1 deletion test-data/unit/check-flags.test
Original file line number Diff line number Diff line change
Expand Up @@ -2701,7 +2701,7 @@ reveal_type(fx) # N: Revealed type is "def [Ts] (int, *args: *tuple[*Ts, int])
[builtins fixtures/tuple.pyi]

[case testOnlyOneRedefinitionModeAllowed]
# flags: --allow-redefinition --allow-redefinition-old --local-partial-types
# flags: --allow-redefinition --allow-redefinition-old
x = 1
[out]
main:1: error: --allow-redefinition-old and --allow-redefinition should not be used together
2 changes: 1 addition & 1 deletion test-data/unit/check-inference.test
Original file line number Diff line number Diff line change
Expand Up @@ -4351,7 +4351,7 @@ def g() -> None:
reveal_type(x) # N: Revealed type is "builtins.int | None"

[case testGlobalVariableNoneInitMultipleFuncsRedefine]
# flags: --allow-redefinition --local-partial-types
# flags: --allow-redefinition

# Widening this is intentionally prohibited (for now).
x = None
Expand Down
6 changes: 3 additions & 3 deletions test-data/unit/check-narrowing.test
Original file line number Diff line number Diff line change
Expand Up @@ -2801,7 +2801,7 @@ while x is not None and b():
[builtins fixtures/primitives.pyi]

[case testAvoidFalseNonOverlappingEqualityCheckInLoop1]
# flags: --allow-redefinition --local-partial-types --strict-equality --warn-unreachable
# flags: --allow-redefinition --strict-equality --warn-unreachable

def f(x: int) -> None:
while True:
Expand All @@ -2813,7 +2813,7 @@ def f(x: int) -> None:
[builtins fixtures/primitives.pyi]

[case testAvoidFalseNonOverlappingEqualityCheckInLoop2]
# flags: --allow-redefinition --local-partial-types --strict-equality --warn-unreachable
# flags: --allow-redefinition --strict-equality --warn-unreachable

class A: ...
class B: ...
Expand Down Expand Up @@ -2870,7 +2870,7 @@ while b():
[builtins fixtures/bool.pyi]

[case testAvoidFalseUnreachableInFinally]
# flags: --allow-redefinition --local-partial-types --strict-equality --warn-unreachable
# flags: --allow-redefinition --strict-equality --warn-unreachable
def f() -> None:
try:
x = 1
Expand Down
4 changes: 2 additions & 2 deletions test-data/unit/check-python310.test
Original file line number Diff line number Diff line change
Expand Up @@ -3510,7 +3510,7 @@ class Two: ...
[builtins fixtures/tuple.pyi]

[case testNewRedefineMatchBasics]
# flags: --allow-redefinition --local-partial-types --strict-equality --warn-unreachable
# flags: --allow-redefinition --strict-equality --warn-unreachable

def f1(x: int | str | list[bytes]) -> None:
match x:
Expand All @@ -3523,7 +3523,7 @@ def f1(x: int | str | list[bytes]) -> None:
reveal_type(y) # N: Revealed type is "builtins.str | builtins.bytes"

[case testNewRedefineLoopWithMatch]
# flags: --allow-redefinition --local-partial-types --strict-equality --warn-unreachable
# flags: --allow-redefinition --strict-equality --warn-unreachable

def f1() -> None:
while True:
Expand Down
Loading
Loading