
    g                         d Z ddlmZmZ d Zy)zj
Limited tests of the visualization module. Right now it just makes
sure that passing custom Axes works.

    )mpfpc                     	 dd l } | j                  j                  d      d   }|j                  d      d d }|D cg c]  }t        |       c}ddgk  rt        dd l}|j                         }|j                  d      }t        t        fD ]C  }|j                  d dd	g|
       |j                         dk(  sJ |j                         dk(  rCJ  |j                         }|j                  d      }t        t        fD ]  }|j                  d ddgddg|
        |j                         dk(  sJ |j                         dk(  sJ y c c}w # t        $ r t        d       Y y w xY w)Nr   -.   c   z8
Skipping test (pylab not available or too old version)
o   c                     | dz  S )Nr    )xs    T/var/www/openai/venv/lib/python3.12/site-packages/mpmath/tests/test_visualization.py<lambda>ztest_axes.<locals>.<lambda>   s    1a4       )axesr   zf(x)c                     | S )Nr   )zs    r   r   ztest_axes.<locals>.<lambda>   s    Ar   i
   zRe(z)zIm(z))
matplotlib__version__splitintImportErrorpylabprintfigureadd_subplotr   r   plot
get_xlabel
get_ylabelcplot)r   version_r   figr   ctxs          r   	test_axesr(   	   s\   	((..s3A6--$Ra(#$GqCFG$"v- ,,.C??3DBx!Qd3 C''' F*** 
 ,,.C??3DBx		+Awb		= ??'''??'''% %  JKs"   :E E
E 
E E&%E&N)__doc__mpmathr   r   r(   r   r   r   <module>r+      s    (r   