B
    <Z°  ã               @   s    d Z ddlmZmZ dd„ ZdS )zj
Limited tests of the visualization module. Right now it just makes
sure that passing custom Axes works.

é    )ÚmpÚfpc              C   s4  yPdd l } | j d¡d }| d¡d d… }dd„ |D ƒddgk rFt‚dd l}W n tk
rl   tdƒ d S X | ¡ }| d	¡}xHtt	gD ]<}|j
d
d„ ddg|d | ¡ dks¶t‚| ¡ dksŠt‚qŠW | ¡ }| d	¡}x.tt	gD ]"}|jdd„ ddgddg|d qæW | ¡ dkst‚| ¡ dks0t‚d S )Nr   ú-Ú.é   c             S   s   g | ]}t |ƒ‘qS © )Úint)Ú.0Ú_r   r   ú>lib/python3.7/site-packages/mpmath/tests/test_visualization.pyú
<listcomp>   s    ztest_axes.<locals>.<listcomp>éc   z8
Skipping test (pylab not available or too old version)
éo   c             S   s   | d S )Nr   r   )Úxr   r   r   Ú<lambda>   s    ztest_axes.<locals>.<lambda>é   )Úaxesr   zf(x)c             S   s   | S )Nr   )Úzr   r   r   r      s    éþÿÿÿiöÿÿÿé
   zRe(z)zIm(z))Ú
matplotlibÚ__version__ÚsplitÚImportErrorÚpylabÚprintZfigureZadd_subplotr   r   ZplotZ
get_xlabelÚAssertionErrorZ
get_ylabelZcplot)r   Úversionr   Zfigr   Zctxr   r   r   Ú	test_axes	   s,    

"r   N)Ú__doc__Zmpmathr   r   r   r   r   r   r   Ú<module>   s   