From: Brett Cannon Date: Tue, 25 Jan 2011 18:26:35 +0000 (+0000) Subject: Tighten the restrictions on the test_sys test which triggers a fatal error when X-Git-Tag: v3.2rc2~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5543e8135240cfe4f3d1021c1debe752e3cd7309;p=thirdparty%2FPython%2Fcpython.git Tighten the restrictions on the test_sys test which triggers a fatal error when run with tracing turned on. --- diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 52e723900914..d37651efba44 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -215,8 +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 + @unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(), + 'fatal error if run with a trace function') 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