From: Charles-François Natali Date: Sun, 8 Sep 2013 10:27:33 +0000 (+0200) Subject: Issue #18935: Fix test_regrtest.test_timeout when built --without-threads (the X-Git-Tag: v3.4.0a3~27^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=833bf1fcb256ea28d0ecf16ab097ff9de2396cb5;p=python Issue #18935: Fix test_regrtest.test_timeout when built --without-threads (the '--timeout' option requires faulthandler.dump_traceback_later). --- diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index 289fb229f2..353874b5a3 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -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)