diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-29 23:37:32 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-29 23:37:32 (GMT) |
commit | 3add4d78ff9f5de02e2c0de09efe9a9b5317539f (patch) | |
tree | c61c6a122b33537814bcc643300f10759fa81010 /Lib/test/test_thread.py | |
parent | e0281cab810c30a23cf2490704e0f85aa4751e83 (diff) | |
download | cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.zip cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.tar.gz cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.tar.bz2 |
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 5705798..577d4cb 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): |