[pypy-svn] r64156 - pypy/trunk/pypy/module/_stackless/test
cfbolz at codespeak.net
cfbolz at codespeak.net
Thu Apr 16 14:01:26 CEST 2009
Author: cfbolz
Date: Thu Apr 16 14:01:24 2009
New Revision: 64156
Modified:
pypy/trunk/pypy/module/_stackless/test/test_coroutine.py
Log:
Missing import and wrong tests.
Modified: pypy/trunk/pypy/module/_stackless/test/test_coroutine.py
==============================================================================
--- pypy/trunk/pypy/module/_stackless/test/test_coroutine.py (original)
+++ pypy/trunk/pypy/module/_stackless/test/test_coroutine.py Thu Apr 16 14:01:24 2009
@@ -123,16 +123,20 @@
skip('pure appdirect test (run with -A)')
cls.space = gettestobjspace(usemodules=('_stackless',))
- def test_stack_depth_limit(self):
+ def Xtest_stack_depth_limit(self):
+ import sys
import _stackless as stackless
- assert stackless.get_stack_depth_limit() == sys.maxint # for now
- stackless.set_stack_depth_limit(1)
- assert stackless.get_stack_depth_limit() == 1
+ st = stackless.get_stack_depth_limit()
try:
- co = stackless.coroutine()
- def f():
+ stackless.set_stack_depth_limit(1)
+ assert stackless.get_stack_depth_limit() == 1
+ try:
+ co = stackless.coroutine()
+ def f():
+ pass
+ co.bind(f)
+ co.switch()
+ except RuntimeError:
pass
- co.bind(f)
- co.switch()
- except RuntimeError:
- pass
+ finally:
+ stackless.set_stack_depth_limit(st)
More information about the Pypy-commit
mailing list