tests: Add test for "not" of a user defined class.

This commit is contained in:
Damien George 2015-12-08 12:34:25 +00:00
parent bdbe8c9ae2
commit de2a2e296b
1 changed files with 10 additions and 0 deletions

View File

@ -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())