diff options
author | Guido van Rossum <guido@python.org> | 2007-02-09 05:37:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-02-09 05:37:30 (GMT) |
commit | be19ed77ddb047e02fe94d142181062af6d99dcc (patch) | |
tree | 70f214e06554046fcccbadeb78665f25e07ce965 /Lib/test/test_dummy_thread.py | |
parent | 452bf519a70c3db0e7f0d2540b1bfb07d9085583 (diff) | |
download | cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.zip cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.gz cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.bz2 |
Fix most trivially-findable print statements.
There's one major and one minor category still unfixed:
doctests are the major category (and I hope to be able to augment the
refactoring tool to refactor bona fide doctests soon);
other code generating print statements in strings is the minor category.
(Oh, and I don't know if the compiler package works.)
Diffstat (limited to 'Lib/test/test_dummy_thread.py')
-rw-r--r-- | Lib/test/test_dummy_thread.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/test/test_dummy_thread.py b/Lib/test/test_dummy_thread.py index f274e0a..288b621 100644 --- a/Lib/test/test_dummy_thread.py +++ b/Lib/test/test_dummy_thread.py @@ -72,13 +72,13 @@ class LockTests(unittest.TestCase): start_time = int(time.time()) _thread.start_new_thread(delay_unlock,(self.lock, DELAY)) if test_support.verbose: - print - print "*** Waiting for thread to release the lock "\ - "(approx. %s sec.) ***" % DELAY + print() + print("*** Waiting for thread to release the lock "\ + "(approx. %s sec.) ***" % DELAY) self.lock.acquire() end_time = int(time.time()) if test_support.verbose: - print "done" + print("done") self.failUnless((end_time - start_time) >= DELAY, "Blocking by unconditional acquiring failed.") @@ -150,9 +150,9 @@ class ThreadTests(unittest.TestCase): thread_count = 5 testing_queue = Queue.Queue(thread_count) if test_support.verbose: - print - print "*** Testing multiple thread creation "\ - "(will take approx. %s to %s sec.) ***" % (DELAY, thread_count) + print() + print("*** Testing multiple thread creation "\ + "(will take approx. %s to %s sec.) ***" % (DELAY, thread_count)) for count in xrange(thread_count): if DELAY: local_delay = round(random.random(), 1) @@ -162,7 +162,7 @@ class ThreadTests(unittest.TestCase): (testing_queue, local_delay)) time.sleep(DELAY) if test_support.verbose: - print 'done' + print('done') self.failUnless(testing_queue.qsize() == thread_count, "Not all %s threads executed properly after %s sec." % (thread_count, DELAY)) @@ -173,8 +173,8 @@ def test_main(imported_module=None): _thread = imported_module DELAY = 2 if test_support.verbose: - print - print "*** Using %s as _thread module ***" % _thread + print() + print("*** Using %s as _thread module ***" % _thread) test_support.run_unittest(LockTests, MiscTests, ThreadTests) if __name__ == '__main__': |