Issue #18935: Fix test_regrtest.test_timeout when built --without-threads (the

'--timeout' option requires faulthandler.dump_traceback_later).
This commit is contained in:
Charles-François Natali 2013-09-08 12:27:33 +02:00
parent 9437d7a7fe
commit 833bf1fcb2
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@ Tests of regrtest.py.
"""
import argparse
import faulthandler
import getopt
import os.path
import unittest
@ -25,6 +26,8 @@ class ParseArgsTestCase(unittest.TestCase):
regrtest._parse_args([opt])
self.assertIn('Run Python regression tests.', out.getvalue())
@unittest.skipUnless(hasattr(faulthandler, 'dump_traceback_later'),
"faulthandler.dump_traceback_later() required")
def test_timeout(self):
ns = regrtest._parse_args(['--timeout', '4.2'])
self.assertEqual(ns.timeout, 4.2)