a
    s=icÑ  ã                   @   s\   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d„ Zd	d
„ ZdS )zL
Backend-loading machinery tests, using variations on the template backend.
é    N)ÚSimpleNamespace)Úpyplot)Úbackend_template)ÚFigureCanvasTemplateÚFigureManagerTemplatec                   C   s$   t  d¡ tt ¡ jƒtks J ‚d S )NÚtemplate)ÚmplÚuseÚtypeÚpltÚfigureÚcanvasr   © r   r   úw/home/droni/.local/share/virtualenvs/DPS-5Je3_V2c/lib/python3.9/site-packages/matplotlib/tests/test_backend_template.pyÚtest_load_template   s    
r   c                 C   sb   t f i ttƒ¤Ž}tjjdœdd„|_|  tj	d|¡ t 
d¡ tt ¡ jƒtksVJ ‚t ¡  d S )N)ÚFigureClassc                _   s   t t||i |¤Žƒ| ƒS )N)r   r   )Únumr   ÚargsÚkwargsr   r   r   Ú<lambda>   s    ÿz#test_load_old_api.<locals>.<lambda>Úmpl_test_backendzmodule://mpl_test_backend)r   Úvarsr   r   r   ZFigureZnew_figure_managerÚsetitemÚsysÚmodulesr	   r
   r   r   r   Zdraw_if_interactive)Zmonkeypatchr   r   r   r   Útest_load_old_api   s    ÿ
r   )Ú__doc__r   Útypesr   Z
matplotlibr   r   r   Zmatplotlib.backendsr   Z$matplotlib.backends.backend_templater   r   r   r   r   r   r   r   Ú<module>   s   