
    xKg                         d dl mZmZ d dlmZ d dlmZ  G d de      ZdZ	 G d de      Z
ed	k(  r ej                          y
y
)    )unittestCUDATestCase)cuda)configc                       e Zd Zy)MyErrorN)__name__
__module____qualname__     h/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/numba/cuda/tests/cudapy/test_userexc.pyr   r      s    r   r   zFIn function [\'"]test_exc[\'"], file [\:\.\/\\\-a-zA-Z_0-9]+, line \d+c                   $     e Zd Z fdZd Z xZS )TestUserExcc                 D    t         |           | j                  d       y )Nz!Exceptions not supported with LTO)supersetUpskip_if_lto)self	__class__s    r   r   zTestUserExc.setUp   s     	<=r   c                    t        j                  dd      d        } |d   d       | j                  t              5 } |d   d       d d d        t        j
                  s)| j                  t        j                        t               | j                  dt        j                               | j                  t              5 } |d   d	       d d d        t        j
                  sR| j                  t        |j                        t               | j                  t        |j                        t               | j                  d
t        |j                               y # 1 sw Y   xY w# 1 sw Y   xY w)Nzvoid(int32)T)debugc                 :    | dk(  rt         | dk(  rt        d      y )N      foo)r   )xs    r   test_excz1TestUserExc.test_user_exception.<locals>.test_exc   s$    Avaen$ r   )r   r   r   r   ztid=[0, 0, 0] ctaid=[0, 0, 0]r   z"tid=[0, 0, 0] ctaid=[0, 0, 0]: foo)r   jitassertRaisesr   r   ENABLE_CUDASIMassertRegexstr	exceptionregex_patternassertIn)r   r   cms      r   test_user_exceptionzTestUserExc.test_user_exception   s   	-t	,	% 
-	% 	qw'2HTN1 ($$S.>5s2<<7HIw'2HTN1 ($$S.>S.>:C<MN ('
 ('s   E!E.!E+.E7)r	   r
   r   r   r(   __classcell__)r   s   @r   r   r      s    >Or   r   __main__N)numba.cuda.testingr   r   numbar   
numba.corer   	Exceptionr   r%   r   r	   mainr   r   r   <module>r0      sM    5  	i 	
 N 
O, O> zHMMO r   