Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r58407:9235686f0e23
Date: 2012-10-24 08:46 +0200
http://bitbucket.org/pypy/pypy/changeset/9235686f0e23/
Log: Also skip part of this test, like for 2.7
diff --git a/lib-python/3.2/test/test_itertools.py
b/lib-python/3.2/test/test_itertools.py
--- a/lib-python/3.2/test/test_itertools.py
+++ b/lib-python/3.2/test/test_itertools.py
@@ -901,9 +901,17 @@
self.assertRaises(TypeError, tee, [1,2], 3, 'x')
# tee object should be instantiable
- a, b = tee('abc')
- c = type(a)('def')
- self.assertEqual(list(c), list('def'))
+ if support.check_impl_detail():
+ # XXX I (arigo) would argue that 'type(a)(iterable)' has
+ # ill-defined semantics: it always return a fresh tee object,
+ # but depending on whether 'iterable' is itself a tee object
+ # or not, it is ok or not to continue using 'iterable' after
+ # the call. I cannot imagine why 'type(a)(non_tee_object)'
+ # would be useful, as 'iter(non_tee_obect)' is equivalent
+ # as far as I can see.
+ a, b = tee('abc')
+ c = type(a)('def')
+ self.assertEqual(list(c), list('def'))
# test long-lagged and multi-way split
a, b, c = tee(range(2000), 3)
@@ -941,6 +949,7 @@
p = proxy(a)
self.assertEqual(getattr(p, '__class__'), type(b))
del a
+ support.gc_collect()
self.assertRaises(ReferenceError, getattr, p, '__class__')
def test_StopIteration(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit