Kaydet (Commit) ef1db54a authored tarafından Ezio Melotti's avatar Ezio Melotti

#17249: check for the availability of the thread module.

üst 2fddfd85
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
from __future__ import with_statement from __future__ import with_statement
import sys import sys
import time import time
import thread
import random import random
import unittest import unittest
from test import test_support from test import test_support
try: try:
import thread
import threading import threading
except ImportError: except ImportError:
thread = None
threading = None threading = None
import _testcapi import _testcapi
...@@ -97,7 +98,7 @@ class TestPendingCalls(unittest.TestCase): ...@@ -97,7 +98,7 @@ class TestPendingCalls(unittest.TestCase):
self.pendingcalls_wait(l, n) self.pendingcalls_wait(l, n)
@unittest.skipUnless(threading, 'Threading required for this test.') @unittest.skipUnless(threading and thread, 'Threading required for this test.')
class TestThreadState(unittest.TestCase): class TestThreadState(unittest.TestCase):
@test_support.reap_threads @test_support.reap_threads
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment