Tighten the restrictions on the test_sys test which triggers a fatal error when

run with tracing turned on.
This commit is contained in:
Brett Cannon 2011-01-25 18:26:35 +00:00
parent cfad97b3ca
commit 5543e81352

View 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