tests: Add test for when instance member overrides class member.

This commit is contained in:
Damien George
2015-01-08 17:48:44 +00:00
parent 5b7aa294e0
commit c33ecb83ba
2 changed files with 11 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
# test that we can override a class method with an instance method
class A:
def foo(self):
return 1
a = A()
print(a.foo())
a.foo = lambda:2
print(a.foo())