Author: Martin Matusiak <[email protected]>
Branch: py3.3
Changeset: r72555:c0bb7244f113
Date: 2014-07-27 11:08 +0200
http://bitbucket.org/pypy/pypy/changeset/c0bb7244f113/
Log: fix repr test_descriptors to accept pypy repr for dict.items
diff --git a/lib-python/3/test/test_reprlib.py
b/lib-python/3/test/test_reprlib.py
--- a/lib-python/3/test/test_reprlib.py
+++ b/lib-python/3/test/test_reprlib.py
@@ -182,9 +182,13 @@
self.assertRegex(r(x), r'<cell at 0x.*\.\.\..*>')
def test_descriptors(self):
- eq = self.assertEqual
# method descriptors
- eq(repr(dict.items), "<method 'items' of 'dict' objects>")
+ self.assertTrue(any((
+ # cpython
+ repr(dict.items) == "<method 'items' of 'dict' objects>",
+ # pypy
+ repr(dict.items).startswith("<function items at 0x"),
+ )))
# XXX member descriptors
# XXX attribute descriptors
# XXX slot descriptors
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit