o
    "`                     @   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   s(  z(dd l } | jdd }|dd d }dd |D ddgk r#tdd l}W n ty6   td Y d S w | }|d	}tt	fD ]}|j
d
d ddg|d | dksZJ | dksbJ qD| }|d	}tt	fD ]}|jdd ddgddg|d qp| dksJ | dksJ d S )Nr   -.   c                 S   s   g | ]}t |qS  )int).0_r   r   A/usr/lib/python3/dist-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_xlabelZ
get_ylabelZcplot)r   versionr   Zfigr   ctxr   r   r   	test_axes	   s.   

 r   N)__doc__Zmpmathr   r   r   r   r   r   r   <module>   s    