
    G8c                     X    d Z ddlZddlmZ ddlZddlmZ ddlm	Z	 ddl
mZmZ d Zd Zy)	zL
Backend-loading machinery tests, using variations on the template backend.
    N)SimpleNamespace)pyplot)backend_template)FigureCanvasTemplateFigureManagerTemplatec                      t        j                  d       t        t        j                         j
                        t        k(  sJ y )Ntemplate)mplusetypepltfigurecanvasr        H/usr/lib/python3/dist-packages/matplotlib/tests/test_backend_template.pytest_load_templater      s.    GGJ

##$(<<<<r   c                 n   t        di t        t              }t        j                  j
                  dd|_        | j                  t        j                  d|       t        j                  d       t        t        j                         j                        t        k(  sJ t        j                          y )N)FigureClassc          	      8    t        t         ||i |      |       S )N)r   r   )numr   argskwargss       r   <lambda>z#test_load_old_api.<locals>.<lambda>   s$     d!=f!=>	E r   mpl_test_backendzmodule://mpl_test_backendr   )r   varsr   r
   r   Figurenew_figure_managersetitemsysmodulesr   r   r   r   r   draw_if_interactive)monkeypatchr   s     r   test_load_old_apir$      s    &@.>)?@'*zz'8'8 	E ' %79IJGG'(

##$(<<<<r   )__doc__r    typesr   
matplotlibr
   r   r   matplotlib.backendsr   $matplotlib.backends.backend_templater   r   r   r$   r   r   r   <module>r*      s*     !  $ 01=
	r   