[pypy-commit] pypy mapdict-interp: A bug.
arigo
noreply at buildbot.pypy.org
Tue May 17 15:45:49 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: mapdict-interp
Changeset: r44245:c8ef5a8e3000
Date: 2011-05-17 15:31 +0200
http://bitbucket.org/pypy/pypy/changeset/c8ef5a8e3000/
Log: A bug.
diff --git a/pypy/objspace/std/test/test_mapdict.py b/pypy/objspace/std/test/test_mapdict.py
--- a/pypy/objspace/std/test/test_mapdict.py
+++ b/pypy/objspace/std/test/test_mapdict.py
@@ -916,6 +916,20 @@
got = a.method()
assert got == 43
+ def test_bug_method_change(self):
+ class A(object):
+ def method(self):
+ return 42
+ a = A()
+ got = a.method()
+ assert got == 42
+ A.method = lambda self: 43
+ got = a.method()
+ assert got == 43
+ A.method = lambda self: 44
+ got = a.method()
+ assert got == 44
+
class AppTestGlobalCaching(AppTestWithMapDict):
def setup_class(cls):
cls.space = gettestobjspace(
More information about the pypy-commit
mailing list