tests: Add test for "not" of a user defined class.
This commit is contained in:
parent
bdbe8c9ae2
commit
de2a2e296b
|
@ -15,3 +15,13 @@ print(not [])
|
|||
print(not [1,])
|
||||
print(not {})
|
||||
print(not {1:1})
|
||||
|
||||
# check user instance
|
||||
class A: pass
|
||||
print(not A())
|
||||
|
||||
# check user instances derived from builtins
|
||||
class B(int): pass
|
||||
print(not B())
|
||||
class C(list): pass
|
||||
print(not C())
|
||||
|
|
Loading…
Reference in New Issue