summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/boundmeth1.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/boundmeth1.py')
-rw-r--r--tests/basics/boundmeth1.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/basics/boundmeth1.py b/tests/basics/boundmeth1.py
index e72153a41a..fe1b454688 100644
--- a/tests/basics/boundmeth1.py
+++ b/tests/basics/boundmeth1.py
@@ -33,6 +33,8 @@ try:
except AttributeError:
print("AttributeError")
+print("--------")
+
# bound method comparison with same object
a = A()
m1 = a.f
@@ -51,6 +53,14 @@ print(m1 == a2.f) # should result in False
print(m2 == a1.f) # should result in False
print(m1 != a2.f) # should result in True
+# bound method comparison with non-bound-method objects
+print(A().f == None) # should result in False
+print(A().f != None) # should result in True
+print(None == A().f) # should result in False
+print(None != A().f) # should result in True
+
+print("--------")
+
# bound method hashing
a = A()
m1 = a.f