[pypy-svn] pypy default: dict.popitem() is not deterministic on pypy.
amauryfa
commits-noreply at bitbucket.org
Thu Jan 27 14:56:55 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch:
Changeset: r41390:71da15edf448
Date: 2011-01-27 13:10 +0100
http://bitbucket.org/pypy/pypy/changeset/71da15edf448/
Log: dict.popitem() is not deterministic on pypy. Simplify the test, and
mark it as an implementation detail.
diff --git a/lib-python/modified-2.7.0/test/mapping_tests.py b/lib-python/modified-2.7.0/test/mapping_tests.py
--- a/lib-python/modified-2.7.0/test/mapping_tests.py
+++ b/lib-python/modified-2.7.0/test/mapping_tests.py
@@ -531,7 +531,10 @@
self.assertEqual(va, int(ka))
kb, vb = tb = b.popitem()
self.assertEqual(vb, int(kb))
- self.assertTrue(not(copymode < 0 and ta != tb))
+ if copymode < 0 and test_support.check_impl_detail():
+ # popitem() is not guaranteed to be deterministic on
+ # all implementations
+ self.assertEqual(ta, tb)
self.assertTrue(not a)
self.assertTrue(not b)
More information about the Pypy-commit
mailing list