]> granicus.if.org Git - python/commitdiff
Skip a recursion depth check test when running under CPython and have a trace
authorBrett Cannon <bcannon@gmail.com>
Sun, 23 Jan 2011 23:06:05 +0000 (23:06 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sun, 23 Jan 2011 23:06:05 +0000 (23:06 +0000)
function set. Otherwise a Python fatal error about hitting an unrecoverable
recursion depth gets triggered.

Closes issue #10985. Code review by Georg Brandl.

Lib/test/test_sys.py

index 50f0e9381b240a68a071ac6d23c8423f342677db..52e723900914eda8622db2262c9f8123f1f20a57 100644 (file)
@@ -215,6 +215,8 @@ class SysModuleTest(unittest.TestCase):
         self.assertEqual(sys.getrecursionlimit(), 10000)
         sys.setrecursionlimit(oldlimit)
 
+    @unittest.skipIf(sys.gettrace(), 'fatal error if run with a trace function')
+    @test.support.cpython_only
     def test_recursionlimit_recovery(self):
         # NOTE: this test is slightly fragile in that it depends on the current
         # recursion count when executing the test being low enough so as to