a
    ›¬<b°  ã                   @   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,  zPdd l } | j d¡d }| d¡d d… }dd„ |D ƒddgk rFt‚dd l}W n tyl   tdƒ Y d S 0 | ¡ }| d	¡}tt	fD ]<}|j
d
d„ ddg|d | ¡ dks´J ‚| ¡ dksˆJ ‚qˆ| ¡ }| d	¡}tt	fD ]"}|jdd„ ddgddg|d qà| ¡ dksJ ‚| ¡ dks(J ‚d S )Nr   ú-Ú.é   c                 S   s   g | ]}t |ƒ‘qS © )Úint)Ú.0Ú_r   r   úo/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/mpmath/tests/test_visualization.pyÚ
<listcomp>   ó    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>   r   ztest_axes.<locals>.<lambda>é   )Úaxesr   zf(x)c                 S   s   | S )Nr   )Úzr   r   r   r      r   éþÿÿÿiöÿÿÿé
   zRe(z)zIm(z))Ú
matplotlibÚ__version__ÚsplitÚImportErrorÚpylabÚprintÚ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   