]> granicus.if.org Git - python/commitdiff
Tighten the restrictions on the test_sys test which triggers a fatal error when
authorBrett Cannon <bcannon@gmail.com>
Tue, 25 Jan 2011 18:26:35 +0000 (18:26 +0000)
committerBrett Cannon <bcannon@gmail.com>
Tue, 25 Jan 2011 18:26:35 +0000 (18:26 +0000)
run with tracing turned on.

Lib/test/test_sys.py

index 52e723900914eda8622db2262c9f8123f1f20a57..d37651efba448c042b3fd257d5554c21d893bc9c 100644 (file)
@@ -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