diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-29 23:37:32 +0000 |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-29 23:37:32 +0000 |
commit | 03f6649445c535b585c00acd7a5fd3b7a3ae5018 (patch) | |
tree | 6719b71a07303286fa8ef3acd2bf48b5f621a19d /Lib/test/test_thread.py | |
parent | 44c8e4b776323e23a7173611c472fd4da04f6fae (diff) | |
download | cpython-03f6649445c535b585c00acd7a5fd3b7a3ae5018.tar.gz |
Raise statement normalization in Lib/test/.
Diffstat (limited to 'Lib/test/test_thread.py')
-rw-r--r-- | Lib/test/test_thread.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py index 57057986c9..577d4cbc9a 100644 --- a/Lib/test/test_thread.py +++ b/Lib/test/test_thread.py @@ -108,7 +108,7 @@ def task2(ident): print('\n*** Barrier Test ***') if done.acquire(0): - raise ValueError, "'done' should have remained acquired" + raise ValueError("'done' should have remained acquired") bar = barrier(numtasks) running = numtasks for i in range(numtasks): @@ -119,11 +119,11 @@ print('all tasks done') # not all platforms support changing thread stack size print('\n*** Changing thread stack size ***') if thread.stack_size() != 0: - raise ValueError, "initial stack_size not 0" + raise ValueError("initial stack_size not 0") thread.stack_size(0) if thread.stack_size() != 0: - raise ValueError, "stack_size not reset to default" + raise ValueError("stack_size not reset to default") from os import name as os_name if os_name in ("nt", "os2", "posix"): @@ -143,7 +143,7 @@ if os_name in ("nt", "os2", "posix"): for tss in (262144, 0x100000, 0): thread.stack_size(tss) if failed(thread.stack_size(), tss): - raise ValueError, fail_msg % tss + raise ValueError(fail_msg % tss) print('successfully set stack_size(%d)' % tss) for tss in (262144, 0x100000): |