U
    #c+                     @   sD   d Z ddlmZ ddlm  mZ ddlmZm	Z	 G dd dZ
dS )z
Test machar. Given recent changes to hardcode type data, we might want to get
rid of both MachAr and this test at some point.

    )MachArN)errstatearrayc                   @   s   e Zd Zdd Zdd ZdS )
TestMachArc                    s4   zt j t fdd W n tk
r.   Y nX d S )Nc                    s
   t |  S )N)r   )vZhiprec @/tmp/pip-unpacked-wheel-b2rbor69/numpy/core/tests/test_machar.py<lambda>       z1TestMachAr._run_machar_highprec.<locals>.<lambda>)ntypesZfloat96r   AttributeError)selfr   r   r	   _run_machar_highprec   s
    zTestMachAr._run_machar_highprecc                 C   sZ   t ddF z|   W n2 tk
rJ } zd| }t|W 5 d }~X Y nX W 5 Q R X d S )Nraise)allz1Caught %s exception, should not have been raised.)r   r   FloatingPointErrorAssertionError)r   emsgr   r   r	   test_underlow   s    zTestMachAr.test_underlowN)__name__
__module____qualname__r   r   r   r   r   r	   r      s   
r   )__doc__Znumpy.core._macharr   Znumpy.core.numerictypescoreZnumerictypesr   Znumpyr   r   r   r   r   r   r	   <module>   s   