Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Aug 24, 2023
1 parent 1eb1abc commit 39b1803
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test-data/unit/check-errorcodes.test
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,9 @@ if any_or_object:

if (my_foo := Foo()): # E: "__main__.my_foo" has type "Foo" which does not implement __bool__ or __len__ so it could always be true in boolean context [truthy-bool]
pass

if my_a := (a or Foo()): # E: "__main__.Foo" returns "Foo" which does not implement __bool__ or __len__ so it could always be true in boolean context [truthy-bool]
pass
[builtins fixtures/list.pyi]

[case testTruthyFunctions]
Expand Down

0 comments on commit 39b1803

Please sign in to comment.