o
    ÐtBh  ã                   @   sT   d Z ddlmZmZmZ G dd„ deƒZG dd„ deƒZdd„ Zd	d
„ Z	dd„ Z
dS )z+
Test my automatically generate exceptions
é    )ÚJoblibExceptionÚJoblibNameErrorÚ_mk_exceptionc                   @   s   e Zd Zdd„ ZdS )ÚCustomExceptionc                 C   s    ||||f\| _ | _| _| _d S ©N)ÚaÚbÚcÚd)Úselfr   r   r	   r
   © r   úu/var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/joblib/test/test_my_exceptions.pyÚ__init__	   s    zCustomException.__init__N)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s    r   c                   @   s   e Zd ZdZdd„ ZdS )ÚCustomException2zˆA custom exception with a .args attribute

    Just to check that the JoblibException created from it
    has it args set correctly
    c                 G   s   || _ || _d S r   )r   Úargs)r   r   r   r   r   r   r      s   
zCustomException2.__init__N)r   r   r   Ú__doc__r   r   r   r   r   r      s    r   c                   C   s8   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   r   Útest_inheritance   s   r   c                  C   sZ   t tƒd tu s
J ‚t tƒd tu sJ ‚tdd„ ƒtg} | D ]}t |ƒd tu s*J ‚qd S )Nr   c                   S   s   d S r   r   r   r   r   r   Ú<lambda>+   s    z0test_inheritance_special_cases.<locals>.<lambda>)r   Ú	Exceptionr   ÚtypeÚbool)Únon_inheritable_classesÚ	exceptionr   r   r   Útest_inheritance_special_cases   s   ÿr   c                  C   sz   t ttttttfD ]1} d}t| ƒd |dddddƒ}t|ƒ}t	|| ƒs%J ‚t	|t
ƒs,J ‚|jj|v s4J ‚||v s:J ‚q	d 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_reprr   r   r   Útest__mk_exception0   s   ÿ
ÿör+   N)r   Újoblib.my_exceptionsr   r   r   r   r   r   r   r   r+   r   r   r   r   Ú<module>   s    