diff options
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): |