
     h                     h    d Z ddlmZmZmZ  G d de          Z G d de          Zd Zd Z	d	 Z
d
S )z+
Test my automatically generate exceptions
    )JoblibExceptionJoblibNameError_mk_exceptionc                       e Zd Zd ZdS )CustomExceptionc                 D    ||||f\  | _         | _        | _        | _        d S N)abcd)selfr
   r   r   r   s        Z/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/joblib/test/test_my_exceptions.py__init__zCustomException.__init__	   s$    )*Aq!&    N)__name__
__module____qualname__r    r   r   r   r      s#        4 4 4 4 4r   r   c                       e Zd ZdZd ZdS )CustomException2zA custom exception with a .args attribute

    Just to check that the JoblibException created from it
    has it args set correctly
    c                 "    || _         || _        d S r	   )r
   args)r   r
   r   s      r   r   zCustomException2.__init__   s    			r   N)r   r   r   __doc__r   r   r   r   r   r      s-         
    r   r   c                      t          t                      t                    sJ t          t                      t                    sJ t          t	          t                    d         u sJ d S )Nr   )
isinstancer   	NameErrorr   r   r   r   r   test_inheritancer      s^    o''33333o''99999}Y77:::::::r   c                     t          t                    d         t          u sJ t          t                    d         t          u sJ t          d           t          g} | D ] }t          |          d         t          u sJ !d S )Nr   c                      d S r	   r   r   r   r   <lambda>z0test_inheritance_special_cases.<locals>.<lambda>+   s    D r   )r   	Exceptionr   typebool)non_inheritable_classes	exceptions     r   test_inheritance_special_casesr'      s    )$$Q'?:::: /**1-@@@@  $LL1148, @ @	i((+>>>>>@ @r   c            	      J   t           t          t          t          t          t
          t          fD ]u} d} t          |           d         |ddddd          }t          |          }t          ||           sJ t          |t                    sJ |j        j        |v sJ ||v sJ vd S )Nz,This message should be in the exception reprr   someotherr   zthat are notzin the repr)r"   	TypeErrorSyntaxError
ValueErrorImportErrorr   r   r   reprr   r   	__class__r   )klassmessageexcexc_reprs       r   test__mk_exceptionr5   0   s    YZ0@B 
# 
#@%mE""1%VWfnmM M99#u%%%%%#/////}%1111("""""
# 
#r   N)r   joblib.my_exceptionsr   r   r   r"   r   r   r   r'   r5   r   r   r   <module>r7      s    5 5 5 5 5 5 5 5 5 54 4 4 4 4i 4 4 4
    y   < < <@ @ @$# # # # #r   