î
çj¯X	  ã               @   s>   d  d l  Z d  d l j j Z d  d l m Z d d „  Z	 d S)é    N)Ú
exceptionsc              C   s-  t  j t d ƒ d d ƒ }  t |  ƒ } d } | | k } | st j d | f d | | f ƒ i t j | ƒ d 6t j | ƒ d 6d	 t j ƒ  k s¡ t j	 t ƒ r° t j t ƒ n d	 d
 6d t j ƒ  k sØ t j	 |  ƒ rç t j |  ƒ n d d 6} d i | d 6} t
 t j | ƒ ƒ ‚ n  d } } } d S)z7The base exception should successfully cast to a stringzsample exceptionzsample descrzsample detailzAerror: sample exception
descr: sample descr
detail: sample detailú==ú0%(py3)s
{%(py3)s = %(py0)s(%(py1)s)
} == %(py6)sZpy3Zpy6ÚstrÚpy0ÚerrZpy1Ú úassert %(py8)sZpy8N)r   )r   r	   )ÚexÚErrorÚ	Exceptionr   Ú
@pytest_arÚ_call_reprcompareÚ	_safereprÚ@py_builtinsÚlocalsÚ_should_repr_global_nameÚAssertionErrorÚ_format_explanation)r   Z@py_assert2Z@py_assert5Ú@py_assert4Z@py_format7Z@py_format9© r   úU/home/kop/biz/barnett/enforcer_project/BRIEF-Script/Enforcer/tests/test_exceptions.pyÚtest_error_exception   s        ³   r   )
Úbuiltinsr   Ú_pytest.assertion.rewriteÚ	assertionÚrewriter   Zenforcerr   r
   r   r   r   r   r   Ú<module>   s     