mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
faulthandler: fix compilating without threads
This commit is contained in:
parent
44e31baf95
commit
ff4cd88266
2 changed files with 15 additions and 0 deletions
|
|
@ -8,6 +8,12 @@ from test import support, script_helper
|
|||
import tempfile
|
||||
import unittest
|
||||
|
||||
try:
|
||||
import threading
|
||||
HAVE_THREADS = True
|
||||
except ImportError:
|
||||
HAVE_THREADS = False
|
||||
|
||||
TIMEOUT = 0.5
|
||||
|
||||
try:
|
||||
|
|
@ -279,6 +285,7 @@ funcA()
|
|||
with temporary_filename() as filename:
|
||||
self.check_dump_traceback(filename)
|
||||
|
||||
@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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue