HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/decorators.pyo
�
_�3Lc@s�ddlmZmZmZddlZddlZddlZddlZddlZddl	Zddl
Zddlm
Z
mZddd�Zdddd�Zd�ZdS(i����(tKnownFailureTesttKnownFailureDidNotFailTesttImageComparisonFailureN(tcomparable_formatstcompare_imagescs.�dkrd�n���fd�}|S(sD

    Assume a will fail if *fail_condition* is True. *fail_condition*
    may also be False or the string 'indeterminate'.

    *msg* is the error message displayed for the test.

    If *known_exception_class* is not None, the failure is only known
    if the exception is an instance of this class. (Default = None)

    sTest known to failcs:ddl}����fd�}|jj��|�S(Ni����cs�y�||�}WnOtk
rd}�r^�dk	rOt|��sO�qOnt���qe�nX�r��dkr�t���n|S(Nt
indeterminate(t	ExceptiontNonet
isinstanceRR(targstkwargstresultterr(tftfail_conditiontknown_exception_classtmsg(sP/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/decorators.pytfailers	(tnosettoolstmake_decorator(R
RR(RRR(R
sP/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/decorators.pytknown_fail_decoratorsN(R(RRRR((RRRsP/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/decorators.pytknownfailureif
s
	g����MbP?csR�dkrtd��n�dkr9dddg�n���fd�}|S(sn
    call signature::

      image_comparison(baseline_images=['my_figure'], extensions=None)

    Compare images generated by the test with those specified in
    *baseline_images*, which must correspond else an
    ImageComparisonFailure exception will be raised.

    Keyword arguments:

      *baseline_images*: list
        A list of strings specifying the names of the images generated
        by calls to :meth:`matplotlib.figure.savefig`.

      *extensions*: [ None | list ]

        If *None*, default to all supported extensions.

        Otherwise, a list of extensions to test. For example ['png','pdf'].
    s!baseline_images must be specifiedtpngtpdftsvgcsFt��\��������fd�}tjj��|�S(Nc	3s�x��D]��g�D]#}tjj�|�d�^q}g�D]'}tjj�d|�d�^qD�x-t|��D]\}}tj||�q�Wg�D]#}tjj�|�d�^q��g�D]}tjj|�^q�}tj|�}�t	�k}|s'd�}n|s:d�}nd}|oI|}	t
|	|dt�������fd��}
|
fVqWdS(Nt.s	expected-s&Cannot compare %s files on this systemsDo not have baseline images %ssNo failure expectedRcs�tjdd��tj�}tj��z
��}Wdtj|�Xxst���D]b\}}tjj|�s�td|��nt	||�dt
�}|rZtd|��qZqZW|S(Ntsavefigt	extensionsimage does not exist: %stin_decorators=images not close: %(actual)s vs. %(expected)s (RMS %(rms).3f)(t
matplotlibtrctostgetcwdtchdirtziptpathtexistsRRtTrue(told_dirRtactualtexpectedR(t
actual_fnamestexpected_fnamesRtfunct
result_dirttol(sP/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/decorators.pytdecorated_compare_imagesgs"

	(R R$tjoinR#tshutiltcopyfileR%tnptallRRR(tfnametorig_expected_fnamestsrctdstR)thave_baseline_imagesthave_baseline_imaget
is_comparabletfail_msgt	will_failR/(tbaseline_dirtbaseline_imagest
extensionsR,R-R.(R*R+RsP/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/decorators.pytcompare_images_generatorVs$
040%


'(t_image_directoriesRRR(R,RA(R?R@R.(R>R,R-sP/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/decorators.pytcompare_images_decoratorSs+N(Rt
ValueError(R?R@R.RC((R?R@R.sP/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/decorators.pytimage_comparison1s/c	Cs |j}|dkr�ddl}|jd�tjd}tjjtjj|��}tjj	tjj
|�d�d}n9|j
d�}tjj|�}tjjtj
j�}tjj|d|�}tjjtjjd	|��}tjj|�stj|�n||fS(
s�
    Compute the baseline and result image directories for testing *func*.
    Create the result directory if it doesn't exist.
    t__main__i����Ns<test module run as script. guessing baseline image locationsiiRR?t
result_images(t
__module__twarningstwarntsystargvR R$tabspathtdirnametsplitexttsplitR0Rttestst__file__R%tmakedirs(	R,tmodule_nameRItscript_nametbasedirtsubdirtmodsR>R-((sP/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/decorators.pyRB�s	

)!(tmatplotlib.testing.noseclassesRRRR RKR1RRtmatplotlib.teststnumpyR3tmatplotlib.testing.compareRRRRRERB(((sP/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/testing/decorators.pyt<module>s$'S