OwlCyberSecurity - MANAGER
Edit File: test_backend_ps.cpython-38.pyc
U ��]� � @ s� d dl Z d dlZd dlmZ d dlZd dlZd dlZd dlZd dlZ d dl mZ d dlm Z mZ d dlmZ d dlmZmZ e�� �B e�d� ejjde jjjkdd �Zejje �d � dd �ZW 5 Q R X ejjdd �ejjdddi fej ddddied�ej dddd ieegd�ddi fdd dd ifej dddd ieegd�gddddddgd�dd� ��Z!dd� Z"eedd � ��Z#d!d"� Z$d#d$� Z%eed%d&� ��Z&ed'gdgd(�d)d*� �Z'ed+d,� �Z(dS )-� N)�Path)�cbook�patheffects)�image_comparison)�_determinism_source_date_epoch�_determinism_check�ignoreZepsz*This test needs a ghostscript installation)�reasonTz"This test needs a TeX installation� )Zrerunszformat, use_log, rcParams�psFzps.usedistillerZghostscript)Zmarks�text.usetexz ps.useafmzps with distillerzps with usetexzeps afmzeps with usetex)Zidsc C s� t j�|� t�� \}}t�� ��}t�� ��}|r:|�d� |� ddgddg� |� d� |j|| d� |j|| d� |�� � d�}|�� }dd� ||fD �\}}||�d d �ks�t�W 5 Q R X W 5 Q R X d S )N�log� � u Déjà vu��format�asciic S s g | ]}t �d d|��qS )s %%.*? � )�re�sub)�.0�x� r �B/usr/lib/python3/dist-packages/matplotlib/tests/test_backend_ps.py� <listcomp>D s z,test_savefig_to_stringio.<locals>.<listcomp>s � )�mpl�rcParams�update�plt�subplots�io�StringIO�BytesIOZ set_yscale�plotZ set_title�savefig�getvalue�encode�replace�AssertionError) r Zuse_logr �fig�axZs_bufZb_bufZs_valZb_valr r r �test_savefig_to_stringio s r, c C sl t �� �Z tjddd�gt jd<