Add "import thread" at the top of the module; this prevents us from
failing later when Python is compiled without threading but a failing 'threading' module can be imported due to an earlier (caught) attempt.
This commit is contained in:
parent
7be8ca0d42
commit
9df3eabd6e
|
@ -1,5 +1,6 @@
|
||||||
# test asynchat -- requires threading
|
# test asynchat -- requires threading
|
||||||
|
|
||||||
|
import thread # If this fails, we can't test this module
|
||||||
import asyncore, asynchat, socket, threading, time
|
import asyncore, asynchat, socket, threading, time
|
||||||
|
|
||||||
HOST = "127.0.0.1"
|
HOST = "127.0.0.1"
|
||||||
|
|
|
@ -20,6 +20,7 @@ via cmdline switches:
|
||||||
NUM_THREADS = 20 # change w/ -t option
|
NUM_THREADS = 20 # change w/ -t option
|
||||||
FILES_PER_THREAD = 50 # change w/ -f option
|
FILES_PER_THREAD = 50 # change w/ -f option
|
||||||
|
|
||||||
|
import thread # If this fails, we can't test this module
|
||||||
import threading
|
import threading
|
||||||
from test_support import TestFailed
|
from test_support import TestFailed
|
||||||
import StringIO
|
import StringIO
|
||||||
|
|
Loading…
Reference in New Issue