mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Issue2564: Prevent a hang in "import test.autotest", which runs the entire test
suite as a side-effect of importing the module. - in test_capi, a thread tried to import other modules - re.compile() imported sre_parse again on every call.
This commit is contained in:
parent
abf8e015c2
commit
4b798bdf8a
2 changed files with 3 additions and 5 deletions
|
@ -19,9 +19,6 @@ def test_main():
|
|||
|
||||
# some extra thread-state tests driven via _testcapi
|
||||
def TestThreadState():
|
||||
import thread
|
||||
import time
|
||||
|
||||
if test_support.verbose:
|
||||
print "auto-thread-state"
|
||||
|
||||
|
@ -45,6 +42,8 @@ def test_main():
|
|||
have_thread_state = False
|
||||
|
||||
if have_thread_state:
|
||||
import thread
|
||||
import time
|
||||
TestThreadState()
|
||||
import threading
|
||||
t=threading.Thread(target=TestThreadState)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue