OwlCyberSecurity - MANAGER
Edit File: conftest.cpython-38.pyc
U ��]� � @ s` d dl Z d dlZd dlmZ dd� Zdd� Ze jdd�d d � �Ze jdd� �Ze jd d� �ZdS )� N)�cbookc C s t jddd� dt _t �� d S )NZaggT)Zforce)� matplotlib�use�_called_from_pytestZ_init_tests�Zconfig� r �=/usr/lib/python3/dist-packages/matplotlib/testing/conftest.py�pytest_configure s r c C s dt _d S )NF)r r r r r r �pytest_unconfigure s r T)Zautousec c sL ddl m} |� ��. d }| j�d�}|d k rTt|j�dksDtd��|j\}t�� }d}| j�d�}|d k r�t|j�dks�td��|j\}tj � � |d k r�dd lm} z|� |� W nD tk r� } z&d |�� kr�t�d �||�� n� W 5 d }~X Y nX t�� � tj�|� W 5 Q R X z d V W 5 |d k �r<|� |� X W 5 Q R X d S )Nr )�_cleanup_cm�backend� z(Marker 'backend' must specify 1 backend.Z _classic_test�stylez$Marker 'style' must specify 1 style.Zcairoz$Failed to switch to backend {} ({}).)Zmatplotlib.testing.decoratorsr �node�get_closest_marker�len�args�AssertionErrorr Zget_backendZtestingZsetupZmatplotlib.pyplotZpyplotZswitch_backend�ImportError�lower�pytest�skip�formatr Z(_suppress_matplotlib_deprecation_warningr r ) �requestr r Zbackend_markerZprev_backendr Zstyle_markerZplt�excr r r �mpl_test_settings sF �� � r c c sR | j �d�j\}|d kr"| �d�}| j}tj|j||fd�� d V W 5 Q R X d S )N�baseline_images)Z parameters)r r r ZgetfixturevalueZfunctionr Z_setattr_cm�__wrapped__)r � extensionr �funcr r r �mpl_image_comparison_parameters>