mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Raise statement normalization in Lib/test/.
This commit is contained in:
parent
e0281cab81
commit
3add4d78ff
47 changed files with 218 additions and 218 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue