We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dad1337 commit 2e7e2f7Copy full SHA for 2e7e2f7
Lib/test/test_pickle.py
@@ -20,6 +20,12 @@
20
except ImportError:
21
has_c_implementation = False
22
23
+try:
24
+ import stackless
25
+ has_stackless = True
26
+except ImportError:
27
+ has_stackless = False
28
+
29
30
class PickleTests(AbstractPickleModuleTests):
31
pass
@@ -146,7 +152,8 @@ class SizeofTests(unittest.TestCase):
146
152
check_sizeof = support.check_sizeof
147
153
148
154
def test_pickler(self):
149
- basesize = support.calcobjsize('5P2n3i2n3iP')
155
+ basesize = support.calcobjsize('5P2n3i2n3iP' +
156
+ ('P' if has_stackless else ''))
150
157
p = _pickle.Pickler(io.BytesIO())
151
158
self.assertEqual(object.__sizeof__(p), basesize)
159
MT_size = struct.calcsize('3nP0n')
0 commit comments