[Python-checkins] python/dist/src/Lib/test test_cpickle.py,1.13,1.13.2.1
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Fri, 21 Feb 2003 13:58:48 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv3203
Modified Files:
Tag: r23a2-branch
test_cpickle.py
Log Message:
This test overflowed the stack in MacPython-OS9 under classic or on OS9. Lowered the recursion limit to 50 if platform==mac.
Index: test_cpickle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_cpickle.py,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -C2 -d -r1.13 -r1.13.2.1
*** test_cpickle.py 28 Jan 2003 22:26:28 -0000 1.13
--- test_cpickle.py 21 Feb 2003 21:58:46 -0000 1.13.2.1
***************
*** 4,8 ****
--- 4,14 ----
from pickletester import AbstractPickleTests, AbstractPickleModuleTests
from test import test_support
+ import sys
+ if sys.platform == 'mac':
+ NRECURSION=50
+ else:
+ NRECURSION=100
+
class cPickleTests(AbstractPickleTests, AbstractPickleModuleTests):
***************
*** 83,87 ****
def test_nonrecursive_deep(self):
a = []
! for i in range(100):
a = [a]
b = self.loads(self.dumps(a))
--- 89,93 ----
def test_nonrecursive_deep(self):
a = []
! for i in range(NRECURSION):
a = [a]
b = self.loads(self.dumps(a))