Author: Carl Friedrich Bolz <cfb...@gmx.de> Branch: list-strategies Changeset: r47632:3e0d01090056 Date: 2011-09-27 15:55 +0200 http://bitbucket.org/pypy/pypy/changeset/3e0d01090056/
Log: fix test by not putting string into list (which eats its identity) diff --git a/pypy/objspace/std/test/test_dictmultiobject.py b/pypy/objspace/std/test/test_dictmultiobject.py --- a/pypy/objspace/std/test/test_dictmultiobject.py +++ b/pypy/objspace/std/test/test_dictmultiobject.py @@ -577,15 +577,17 @@ assert getattr(a, s) == 42 def test_setattr_string_identify(self): - attrs = [] + class StrHolder(object): + pass + holder = StrHolder() class A(object): def __setattr__(self, attr, value): - attrs.append(attr) + holder.seen = attr a = A() s = "abc" setattr(a, s, 123) - assert attrs[0] is s + assert holder.seen is s class AppTestDictViews: def test_dictview(self): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit