Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r59198:dad6ba6dfaf1
Date: 2012-12-01 23:26 +0100
http://bitbucket.org/pypy/pypy/changeset/dad6ba6dfaf1/
Log: test_deque: copy tweaks from the 2.7 directory.
diff --git a/lib-python/3.2/test/test_deque.py
b/lib-python/3.2/test/test_deque.py
--- a/lib-python/3.2/test/test_deque.py
+++ b/lib-python/3.2/test/test_deque.py
@@ -352,7 +352,10 @@
for match in (True, False):
d = deque(['ab'])
d.extend([MutateCmp(d, match), 'c'])
- self.assertRaises(IndexError, d.remove, 'c')
+ # On CPython we get IndexError: deque mutated during remove().
+ # Why is it an IndexError during remove() only???
+ # On PyPy it is a RuntimeError, as in the other operations.
+ self.assertRaises((IndexError, RuntimeError), d.remove, 'c')
self.assertEqual(d, deque())
def test_repr(self):
@@ -631,6 +634,7 @@
p = weakref.proxy(d)
self.assertEqual(str(p), str(d))
d = None
+ support.gc_collect()
self.assertRaises(ReferenceError, str, p)
def test_strange_subclass(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit