From: Guido van Rossum Date: Sat, 14 Apr 2001 14:35:43 +0000 (+0000) Subject: Add "import thread" at the top of the module; this prevents us from X-Git-Tag: v2.1c2~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9df3eabd6ef2a0a177976eacb785e630680c0437;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Lib/test/test_asynchat.py b/Lib/test/test_asynchat.py index c887cec6ae38..ccaf90781489 100644 --- a/Lib/test/test_asynchat.py +++ b/Lib/test/test_asynchat.py @@ -1,5 +1,6 @@ # test asynchat -- requires threading +import thread # If this fails, we can't test this module import asyncore, asynchat, socket, threading, time HOST = "127.0.0.1" diff --git a/Lib/test/test_threadedtempfile.py b/Lib/test/test_threadedtempfile.py index 5b06c18ac8bb..9aa93763e374 100644 --- a/Lib/test/test_threadedtempfile.py +++ b/Lib/test/test_threadedtempfile.py @@ -20,6 +20,7 @@ via cmdline switches: NUM_THREADS = 20 # change w/ -t option FILES_PER_THREAD = 50 # change w/ -f option +import thread # If this fails, we can't test this module import threading from test_support import TestFailed import StringIO