diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-04-07 09:50:25 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-04-07 09:50:25 (GMT) |
commit | ff4cd88266b37d266ca607073d9a1122110ef701 (patch) | |
tree | 935d6f368bd5b94a3cb3cdd537391950aff58602 /Lib/test/test_faulthandler.py | |
parent | 44e31baf958b31c3eb0b79b4e5c7176b4c6d11a7 (diff) | |
download | cpython-ff4cd88266b37d266ca607073d9a1122110ef701.zip cpython-ff4cd88266b37d266ca607073d9a1122110ef701.tar.gz cpython-ff4cd88266b37d266ca607073d9a1122110ef701.tar.bz2 |
faulthandler: fix compilating without threads
Diffstat (limited to 'Lib/test/test_faulthandler.py')
-rw-r--r-- | Lib/test/test_faulthandler.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py index 59a0a6d..bfe662e 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -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. |