python (3.12.0)
͑e d dl Z d dlZd dlZd dlmZ G d dej
Z G d dej
Z G d deej
Z G d d
e Z G d de Z
G d
de Z G d de Z G d de Z
G d de Z G d de Z G d de Zedk( r ej$ yy) N)ExceptionIsLikeMixinc $ e Zd Zd Zd Zd Zd Zy)TestInvalidExceptStarc g d}|D ]- }| j t 5 t |dd d d d / y # 1 sw Y :xY w)N)z:try: pass
except ValueError: pass
except* TypeError: pass
z:try: pass
except* ValueError: pass
except TypeError: pass
z?try: pass
except ValueError as e: pass
except* TypeError: pass
z?try: pass
except* ValueError as e: pass
except TypeError: pass
z?try: pass
except ValueError: pass
except* TypeError as e: pass
z?try: pass
except* ValueError: pass
except TypeError as e: pass
z0try: pass
except ValueError: pass
except*: pass
z0try: pass
except* ValueError: pass
except: pass
<string>exec)assertRaisesSyntaxErrorcompile)selferrorserrs I/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_except_star.py1test_mixed_except_and_except_star_is_syntax_errorzGTestInvalidExceptStar.test_mixed_except_and_except_star_is_syntax_error sN
1C"";/
1Z0
1
1 1
1
1s 8A c | j t 5 t d # g xt % x}d }~nd }~ nn x Y ncY w xY wd d d y # 1 sw Y y xY w)Nblah)r TypeErrorOSErrorExceptionGroupr es r 7test_except_star_ExceptionGroup_is_runtime_error_singlezMTestInvalidExceptStar.test_except_star_ExceptionGroup_is_runtime_error_single sN
y
)
fo%
N
s A#A AAc | j t 5 t dt d g # g xt t f% x n nn x Y ncY w xY wd d d y # 1 sw Y y xY w)Neg* )r r r
ValueErrorr s r 6test_except_star_ExceptionGroup_is_runtime_error_tuplezLTestInvalidExceptStar.test_except_star_ExceptionGroup_is_runtime_error_tuple s]
y
)
$TJrN+;<<
Y/
s A.AAA%c B | j t 5 t # g xd% x n nn x Y ncY w xY wd d d n# 1 sw Y nxY w| j t 5 t # g xt df% x n nn x Y ncY w xY wd d d y # 1 sw Y y xY w)Nr )r r r r s r 'test_except_star_invalid_exception_typez=TestInvalidExceptStar.test_except_star_invalid_exception_type% s
y
)
B
y
)
Z$
s6 A6AA#B%A++B BBN)__name__
__module____qualname__r r r r r r r s 1 r% r c 4 e Zd ZdZd Zd Zd Zd Zd Zd Z y) (TestBreakContinueReturnInExceptStarBlockzC'break', 'continue' and 'return' cannot appear in an except\* blockc | j t | j 5 t t j
| dd d d d y # 1 sw Y y xY w)Nr r )assertRaisesRegexr
MSGr textwrapdedent)r srcs r
check_invalidz6TestBreakContinueReturnInExceptStarBlock.check_invalid7 s@
#
#K
: >HOOC(*f= >