Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r57582:14baa42f48e3
Date: 2012-09-25 11:50 +0200
http://bitbucket.org/pypy/pypy/changeset/14baa42f48e3/
Log: port some of the changes there are in lib-python/2.7; some tests
still failing
diff --git a/lib-python/3.2/test/test_set.py b/lib-python/3.2/test/test_set.py
--- a/lib-python/3.2/test/test_set.py
+++ b/lib-python/3.2/test/test_set.py
@@ -309,6 +309,7 @@
fo.close()
support.unlink(support.TESTFN)
+ @support.impl_detail(pypy=False)
def test_do_not_rehash_dict_keys(self):
n = 10
d = dict.fromkeys(map(HashCountingInt, range(n)))
@@ -566,6 +567,7 @@
p = weakref.proxy(s)
self.assertEqual(str(p), str(s))
s = None
+ support.gc_collect()
self.assertRaises(ReferenceError, str, p)
def test_rich_compare(self):
@@ -635,6 +637,7 @@
s.__init__(self.otherword)
self.assertEqual(s, set(self.word))
+ @support.impl_detail()
def test_singleton_empty_frozenset(self):
f = frozenset()
efs = [frozenset(), frozenset([]), frozenset(()), frozenset(''),
@@ -827,9 +830,10 @@
for v in self.set:
self.assertIn(v, self.values)
setiter = iter(self.set)
- # note: __length_hint__ is an internal undocumented API,
- # don't rely on it in your own programs
- self.assertEqual(setiter.__length_hint__(), len(self.set))
+ if support.check_impl_detail():
+ # note: __length_hint__ is an internal undocumented API,
+ # don't rely on it in your own programs
+ self.assertEqual(setiter.__length_hint__(), len(self.set))
def test_pickling(self):
p = pickle.dumps(self.set)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit