summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_faulthandler.py
diff options
context:
space:
mode:
authorAntoine Pitrou <pitrou@free.fr>2017-09-07 16:56:24 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-09-07 16:56:24 (GMT)
commita6a4dc816d68df04a7d592e0b6af8c7ecc4d4344 (patch)
tree1c31738009bee903417cea928e705a112aea2392 /Lib/test/test_faulthandler.py
parent1f06a680de465be0c24a78ea3b610053955daa99 (diff)
downloadcpython-a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344.zip
cpython-a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344.tar.gz
cpython-a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344.tar.bz2
bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config * Always define WITH_THREAD for compatibility.
Diffstat (limited to 'Lib/test/test_faulthandler.py')
-rw-r--r--Lib/test/test_faulthandler.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
index e2fcb2b..889e641 100644
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -8,15 +8,11 @@ import sys
from test import support
from test.support import script_helper, is_android, requires_android_level
import tempfile
+import threading
import unittest
from textwrap import dedent
try:
- import threading
- HAVE_THREADS = True
-except ImportError:
- HAVE_THREADS = False
-try:
import _testcapi
except ImportError:
_testcapi = None
@@ -154,7 +150,6 @@ class FaultHandlerTests(unittest.TestCase):
3,
'Segmentation fault')
- @unittest.skipIf(not HAVE_THREADS, 'need threads')
def test_fatal_error_c_thread(self):
self.check_fatal_error("""
import faulthandler
@@ -231,7 +226,7 @@ class FaultHandlerTests(unittest.TestCase):
2,
'xyz')
- @unittest.skipIf(sys.platform.startswith('openbsd') and HAVE_THREADS,
+ @unittest.skipIf(sys.platform.startswith('openbsd'),
"Issue #12868: sigaltstack() doesn't work on "
"OpenBSD if Python is compiled with pthread")
@unittest.skipIf(not hasattr(faulthandler, '_stack_overflow'),
@@ -456,7 +451,6 @@ class FaultHandlerTests(unittest.TestCase):
self.assertEqual(trace, expected)
self.assertEqual(exitcode, 0)
- @unittest.skipIf(not HAVE_THREADS, 'need threads')
def check_dump_traceback_threads(self, filename):
"""
Call explicitly dump_traceback(all_threads=True) and check the output.