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

Skip to content
Prev Previous commit
Next Next commit
Test fixes
  • Loading branch information
JukkaL committed Apr 20, 2026
commit 83fc2a46867b468252e2eb360b9814742a4341ac
8 changes: 4 additions & 4 deletions test-data/unit/check-inference.test
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ if int():
[builtins fixtures/for.pyi]

[case testReusingInferredForIndex2]
# flags: --allow-redefinition
# flags: --allow-redefinition-old

def f() -> None:
for a in [A()]: pass
Expand All @@ -1221,7 +1221,7 @@ class B: pass
[out]

[case testReusingInferredForIndex3]
# flags: --disallow-redefinition
# flags: --disallow-redefinition-old
def f() -> None:
for a in [A()]: pass
a = A()
Expand Down Expand Up @@ -3050,14 +3050,14 @@ _ = 0
_ = '' # E: Incompatible types in assignment (expression has type "str", variable has type "int")

[case testUnusedTargetNotClass]
# flags: --allow-redefinition
# flags: --allow-redefinition-old
class C:
_, _ = 0, 0
_ = ''
reveal_type(C._) # N: Revealed type is "builtins.str"

[case testUnusedTargetNotClass2]
# flags: --disallow-redefinition
# flags: --disallow-redefinition-old
class C:
_, _ = 0, 0
_ = '' # E: Incompatible types in assignment (expression has type "str", variable has type "int")
Expand Down