[pypy-commit] pypy py3.5: Skip more tests on pypy
arigo
pypy.commits at gmail.com
Fri Sep 22 09:18:55 EDT 2017
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r92438:8246644e701d
Date: 2017-09-22 15:17 +0200
http://bitbucket.org/pypy/pypy/changeset/8246644e701d/
Log: Skip more tests on pypy
diff --git a/lib-python/3/test/test_marshal.py b/lib-python/3/test/test_marshal.py
--- a/lib-python/3/test/test_marshal.py
+++ b/lib-python/3/test/test_marshal.py
@@ -349,7 +349,7 @@
dictobj = {"hello":floatobj, "goodbye":floatobj, floatobj:"hello"}
def helper3(self, rsample, recursive=False, simple=False,
- check_sharing=True):
+ check_sharing=True, check_non_sharing=True):
#we have two instances
sample = (rsample, rsample)
@@ -368,21 +368,26 @@
s2 = marshal.dumps(sample, 2)
n2 = CollectObjectIDs(set(), marshal.loads(s2))
#old format generated more instances
- self.assertGreater(n2, n0)
+ # except on pypy where equal ints or floats always have
+ # the same id anyway
+ if check_non_sharing:
+ self.assertGreater(n2, n0)
#if complex objects are in there, old format is larger
- if not simple:
+ if check_non_sharing and not simple:
self.assertGreater(len(s2), len(s3))
else:
self.assertGreaterEqual(len(s2), len(s3))
def testInt(self):
self.helper(self.intobj)
- self.helper3(self.intobj, simple=True)
+ self.helper3(self.intobj, simple=True,
+ check_non_sharing=support.check_impl_detail())
def testFloat(self):
self.helper(self.floatobj)
- self.helper3(self.floatobj)
+ self.helper3(self.floatobj,
+ check_non_sharing=support.check_impl_detail())
def testStr(self):
self.helper(self.strobj)
More information about the pypy-commit
mailing list