tests/basics: Add tests for equality between bool and int/float/complex.
False/True should be implicitly converted to 0/1 when compared with numeric types.
This commit is contained in:
@@ -10,6 +10,10 @@ print(sorted(s))
|
||||
s = {1 + len(s)}
|
||||
print(s)
|
||||
|
||||
# bools mixed with integers
|
||||
s = {False, True, 0, 1, 2}
|
||||
print(len(s))
|
||||
|
||||
# Sets are not hashable
|
||||
try:
|
||||
{s: 1}
|
||||
|
||||
Reference in New Issue
Block a user