diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-05-20 21:35:26 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-05-20 21:35:26 (GMT) |
commit | ee8712cda46338d223509cc5751fd36509ad3860 (patch) | |
tree | bb9d363b4276566415457980472001c7e3ec2bed /Lib/test/test_dummy_threading.py | |
parent | 6a654814ea3f3a918935762ffdcd33ae98e00278 (diff) | |
download | cpython-ee8712cda46338d223509cc5751fd36509ad3860.zip cpython-ee8712cda46338d223509cc5751fd36509ad3860.tar.gz cpython-ee8712cda46338d223509cc5751fd36509ad3860.tar.bz2 |
#2621 rename test.test_support to test.support
Diffstat (limited to 'Lib/test/test_dummy_threading.py')
-rw-r--r-- | Lib/test/test_dummy_threading.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/test_dummy_threading.py b/Lib/test/test_dummy_threading.py index 2d0dadd..4e983ce 100644 --- a/Lib/test/test_dummy_threading.py +++ b/Lib/test/test_dummy_threading.py @@ -1,4 +1,4 @@ -from test import test_support +from test import support import unittest import dummy_threading as _threading import time @@ -15,20 +15,20 @@ class DummyThreadingTestCase(unittest.TestCase): # module. #delay = random.random() * 2 delay = 0 - if test_support.verbose: + if support.verbose: print('task', self.getName(), 'will run for', delay, 'sec') sema.acquire() mutex.acquire() running += 1 - if test_support.verbose: + if support.verbose: print(running, 'tasks are running') mutex.release() time.sleep(delay) - if test_support.verbose: + if support.verbose: print('task', self.getName(), 'done') mutex.acquire() running -= 1 - if test_support.verbose: + if support.verbose: print(self.getName(), 'is finished.', running, 'tasks are running') mutex.release() sema.release() @@ -49,15 +49,15 @@ class DummyThreadingTestCase(unittest.TestCase): self.threads.append(t) t.start() - if test_support.verbose: + if support.verbose: print('waiting for all tasks to complete') for t in self.threads: t.join() - if test_support.verbose: + if support.verbose: print('all tasks done') def test_main(): - test_support.run_unittest(DummyThreadingTestCase) + support.run_unittest(DummyThreadingTestCase) if __name__ == '__main__': |