403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.170
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/matplotlib/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/matplotlib/tests/__pycache__/test_animation.cpython-312.pyc
�

G8�cH6��F�ddlZddlmZddlZddlZddlZddlZddlZddl	Z	ddl
Zddl
mZ
ddl
mZddlmZe	j"�d��ZGd�dej&�Zd	�Ze	j,j/d
ee��gd
g��d
��Zd�Zej6j9d�Gd�de��Zgd�Zd�Ze	j,j/de��e	j,j/d
ee��gd
g��d���Z e	j,j/de	jBde	j,jEejFjI�d����e	jBde	j,jEejJjI�d����g�e	j,j/dgd��e	j,j/d
ee��gd
g��d����Z&e	j,j/d
ee'e(d ���!�gd
g��d"��Z)d#�Z*e	j,j/d$e	jBd%e	j,jEej6jWejXd&�d'����d(g�e	j,j/d
ed)�!�gd
g��d*���Z-e	j,j/d$e	jBd%e	j,jEej6jWejXd&�d'����d(g�e	j,j/d
ed)�!�gd
g��d+���Z.e	j,jEej^d,k7d-��d.��Z0e	j,j/d/d0d1g�d2��Z1e	j,j/d3gd4��d5��Z2d6�Z3d7�Z4ed8g�9�d:��Z5y);�N)�Path)�pyplot)�	animation)�check_figures_equalc�L��tj�\}}|jgg�\�|jdd�|j	dd��fd�}�fd�}tt
|di��}|jdtj�}d	|vrd
|d	<|d|||d�|��S)
z)Create a simple animation (with options).r�
����c�.���jgg��fS�N��set_data��lines��A/usr/lib/python3/dist-packages/matplotlib/tests/test_animation.py�initzanim.<locals>.init�����
�
�b�"���u��c���tjddd�}tj||z�}�j||��fS)Nrr�d)�np�linspace�sinr)�i�x�yrs   �r�animatezanim.<locals>.animates;����K�K��2�s�#���F�F�1�q�5�M���
�
�a����u�r�param�klass�frames�)�fig�func�	init_func�)
�plt�subplots�plot�set_xlim�set_ylim�dict�getattr�popr�
FuncAnimation)�requestr"�axrr�kwargsrrs       @r�animr2s�����l�l�n�G�C���G�G�B��O�E�D��K�K��2���K�K��A�����'�'�7�B�/�
0�F��J�J�w�	� 7� 7�8�E��v����x���A�S�w�$�A�&�A�Arc�"�eZdZdZd�Zd�Zd�Zy)�NullMovieWritera�
    A minimal MovieWriter.  It doesn't actually write anything.
    It just saves the arguments that were given to the setup() and
    grab_frame() methods as attributes, and counts how many times
    grab_frame() is called.

    This class doesn't have an __init__ method with the appropriate
    signature, and it doesn't define an isAvailable() method, so
    it cannot be added to the 'writers' registry.
    c�J�||_||_||_||_d|_y)Nr)r"�outfile�dpi�args�_count)�selfr"r6r7r8s     r�setupzNullMovieWriter.setup8s%�������������	���rc�<�||_|xjdz
c_y)Nr
)�savefig_kwargsr9)r:r=s  r�
grab_framezNullMovieWriter.grab_frame?s��,������q��rc��yrr%�r:s r�finishzNullMovieWriter.finishCs��rN)�__name__�
__module__�__qualname__�__doc__r;r>rAr%rrr4r4,s��	���
rr4c�h�d}d}td��}t�}|j||||��|jt	j
d�k(sJ�|j|k(sJ�|j|k(sJ�|jdk(sJ�|j|k(sJ�|j|jk(sJ�y)N�unused.null�2r)�foo)r7�writerr=r
r%)r+r4�saver"r&�figurer6r7r8r=r9�
save_count)r2�filenamer7r=rJs     r�test_null_movie_writerrOGs����H�
�C��a�[�N�
�
�F��I�I�h�C��+��-��:�:����A��&�&�&��>�>�X�%�%�%��:�:������;�;�"����� � �N�2�2�2��=�=�D�O�O�+�+�+rr2)r)�indirectc�6�tj�dk(rtjj	�tjdi|��}tjtd��5~tjj	�ddd�y#1swYyxYw)N�PyPyzAnimation was deleted��matchr%)
�platform�python_implementationr�testing�break_cyclesrr.�pytest�warns�Warning�r2s r�test_animation_deleter]Yso���%�%�'�6�1�	�
�
���!��"�"�*�T�*�D�	���g�%<�	=�"��
�
�
���!�"�"�"�s�& B�Bc���Gd�dtj�}tj�}d}d}d}d}dg}|||||�}|j	||�|j
|j
k(sJ�y)Nc��eZdZd�Zy)�7test_movie_writer_dpi_default.<locals>.DummyMovieWriterc��yrr%r@s r�_runz<test_movie_writer_dpi_default.<locals>.DummyMovieWriter._runhs��rN)rBrCrDrbr%rr�DummyMovieWriterr`gs��	rrcrGr!�unusedr
)r�MovieWriterr&rLr;r7)rcr"rN�fps�codec�bitrate�
extra_argsrJs        r�test_movie_writer_dpi_defaultrjfsp���9�0�0��
�*�*�,�C��H�
�C��E��G���J�
�c�5�'�:�
>�F�
�L�L��h���:�:���� � � r�nullc�(�eZdZ		dd�Zed��Zy)�RegisteredNullMovieWriterNc��yrr%)r:rfrgrhri�metadatas      r�__init__z"RegisteredNullMovieWriter.__init__�s��rc��y)NTr%)�clss r�isAvailablez%RegisteredNullMovieWriter.isAvailable�s��r)NNNNN)rBrCrDrp�classmethodrsr%rrrmrmys#��6:�+/�
����rrm))�ffmpeg�	movie.mp4)�ffmpeg_filerv)�imagemagick�	movie.gif)�imagemagick_filery)�pillowry)�htmlz
movie.html)rkz
movie.nullc#�K�tD]�\}}tjj|�setj
j
d|�d��}t	j|d||g����t	j|dt|�|g������tj|}t|ddg�D]}|||f��||t|�f�����y�w)Nzwriter 'z' not available on this system��marks�supported_formats)
�
WRITER_OUTPUTr�writers�is_availablerY�mark�skiprrr,)rJ�outputr��writer_class�frame_formats     r�gen_writersr��s�����'�5����� � �-�-�f�5��;�;�#�#��6�(�"@�A�C�D��,�,�v�t�V�D�6�B�B��,�,�v�t�T�&�\�$��H�H�� �(�(��0��#�L�2E��v�N�	5�L��,��.�.��,��V��4�4�	5�5�s�CCzwriter, frame_format, outputc	�$�|�|tjd<tjd	i|��}d}d}|dk(r|jjd�d}d}|j
�5|j|d|d||��ddd�~y#1swY~yxYw)
Nzanimation.frame_formatru)g33333�%@g�Q��k"@gY@�h264�i�)rfrJrhr7rgr%)r&�rcParamsrr.�_fig�set_size_inches�as_cwdrK)�tmpdirrJr�r�r2r7rgs       r�test_save_animation_smoketestr��s�����1=����-�.��"�"�*�T�*�D�
�C��E�
����	�	�!�!�-�0�����
������	�	�&�b���#��	�	��	
�	�	
�s�#B�BrJru�Requires FFMpeg)�reasonr~rxzRequires ImageMagickz
html, want))�noneN)�html5z<video width)�jshtmlz<script c�@�tj�dk(rtjj	�|dk(r8|dk(r3t
jj�stjd�tjdi|��}tj||d��5|j�}ddd�|�F|�J�tjt�5~tjj	�ddd�y||vsJ�y#1swY�XxYw#1swYyxYw)NrRrxr�r�)�animation.writerzanimation.htmlr%)rUrVrrWrXr�FFMpegWriterrsrYr�r.r&�
rc_context�_repr_html_rZ�UserWarning)rJr|�wantr2s    r�test_animation_repr_htmlr��s���"�%�%�'�6�1�	�
�
���!��-��D�G�O��*�*�6�6�8����%�&��"�"�*�T�*�D�	���V�+/�1�
2�"����!��"��|��|��|�
�\�\�+�
&�	&���J�J�#�#�%�	&�	&��t�|��|�"�"��
	&�	&�s� D� D�D�Dr!)r c�:�|jdt���y)NrG�rJ)rKr4r\s r�test_no_length_framesr��s��	�I�I�m�O�$5�I�6rc�R�ttjj�dkDsJ�dtj
d<tjj
d�rJ�tjdk7rdnd}|tj
d<tjj
d�sJ�y)Nr�not_available_ever_xxxxzanimation.ffmpeg_pathru�win32�true�where)	�lenrr��_registered�mplr�r��sysrU)�bins r�test_movie_writer_registryr��s����y� � �,�,�-��1�1�1�,E�C�L�L�(�)�� � �-�-�h�7�7�7��L�L�G�+�&��C�,/�C�L�L�(�)����)�)�(�3�3�3r�method_name�to_html5_videor�zanimation writer not installed�	to_jshtmlr
c�z�|jd�|j�5tjddi�5t	||��ddd�ddd�t|j�dk(sJ�|j\}|jdk(r|jdk(sJ�y#1swY�ZxYw#1swY�^xYw)N�WARNINGzanimation.embed_limitg���ư>r
zmatplotlib.animation)	�	set_levelr�r�r�r,r��records�name�	levelname)r��caplogr�r2�records     r�test_embed_limitr��s������Y��	����)�
�^�^�4�d�;�
<�	)�&�G�D�+�&�(�	)�)��v�~�~��!�#�#�#��n�n�G�F��K�K�1�1�� � �I�-�/�
.�-�	)�	)��)�)�s"�B1�B%�B1�%B.	�*B1�1B:c���|j�5t||��ttt	|��j��gk(sJ�	ddd�y#1swYyxYwr)r�r,�listr�str�iterdir)r�r�r2s   r�test_cleanup_temporariesr�
sV��
����7�"���k�"�$��D��V��%�-�-�/�0�B�6�6�6�7�7�7�s�AA�A&�posixzrequires a POSIX OSc��|j�5|jddtjdz�t	t|�d�}|j
d�tj|d�tjtj�5|jd�ddd�ddd�y#1swY�xYw#1swYyxYw)a!
    Test that we correctly raise a CalledProcessError when ffmpeg fails.

    To do so, mock ffmpeg using a simple executable shell script that
    succeeds when called with no arguments (so that it gets registered by
    `isAvailable`), but fails otherwise, and add it to the $PATH.
    �PATHz.:rus#!/bin/sh
[[ $@ -eq 0 ]]
i�z	test.mpegN)
r��setenv�os�environrr��write_bytes�chmodrY�raises�
subprocess�CalledProcessErrorrK)r��monkeypatchr2�exe_paths    r�test_failing_ffmpegr�s���
����#����6�4�"�*�*�V�*<�#<�=���F��X�.�����;�<�
����5�!�
�]�]�:�8�8�
9�	#��I�I�k�"�	#�#�#�
	#�	#��#�#�s$�BC�B:�)C�:C	�?C�C�cache_frame_dataFTc��	�
��tj�\}}|jgg�\�Gd�dt��	�fd�}�fd�}g�
�	�
fd�}t	j
|||||��}t
�}|jd|��t�
�d	k(sJ�tjj��
D]}|�du|k7r�J�y)
Nc��eZdZy)�2test_funcanimation_cache_frame_data.<locals>.FrameN)rBrCrDr%rr�Framer�.s��rr�c�.���jgg��fSrr
rs�rrz1test_funcanimation_cache_frame_data.<locals>.init2rrc�:���j|d|d��fS)Nrrr
)�framers �rrz4test_funcanimation_cache_frame_data.<locals>.animate6s ����
�
�e�C�j�%��*�-��u�rc3��K�td�D]j}tjddd�}tjj	d�}�||��}�jt
j|��|���ly�w)Nr!rrr)rr)�rangerr�random�rand�append�weakref�ref)�_rrr�r��frames_generateds    ��r�frames_generatorz=test_funcanimation_cache_frame_data.<locals>.frames_generator<sg������q��
	�A����A�r�3�'�A��	�	���s�#�A��A��O�E�
�#�#�G�K�K��$6�7��K�
	�s�A:A=)r$r r�rGr�r!)r&r'r(r+rr.r4rKr�rrWrX)r�r"r0rrr�r2rJ�fr�r�rs         @@@r�#test_funcanimation_cache_frame_datar�)s�����l�l�n�G�C���G�G�B��O�E�D�
��
�������"�"�3��4�*:�4D�F�D��
�F��I�I�m�F�I�+��� �A�%�%�%��J�J����
�1����t�� 0�0�0�0�1r�return_value)N�stringr
)r��artistc�����tj�\}}|jg�\���fd�}tjt
�5t
j||d��ddd�y#1swYyxYw)Nc�B���jddgd|g��dk(r�S�S)Nrr
r�r
)rrr�s ��rrz test_draw_frame.<locals>.animateis,����
�
�q�!�f�q�!�f�%��8�#��K��rT)�blit)r&r'r(rYr��RuntimeErrorrr.)r�r"r0rrs`   @r�test_draw_framer�Ws]����l�l�n�G�C���G�G�B�K�E�D� �
���|�	$�9�����W�4�8�9�9�9�s�A.�.A7c	��tj�\}}d�}tj||t	td��dd��}|j
�5|jdd��ddd�tjtd�	�5|j�ddd�y#1swY�>xYw#1swYyxYw)
Nc��gSrr%�r�s r�updatez(test_exhausted_animation.<locals>.updatey����	rrF�r �repeatr��test.gifr{r��	exhaustedrS)r&r'rr.�iterr�r�rKrYrZr��_start�r�r"r0r�r2s     r�test_exhausted_animationr�vs����l�l�n�G�C����"�"��V�D��r��O�E���D�

����/��	�	�*�X�	�.�/�
���k��	5�����
���/�/����s�B(�B4�(B1�4B=c���tj�\}}d�}tj||gdd��}t	j
td��5|j�ddd�y#1swYyxYw)Nc��gSrr%r�s rr�z%test_no_frame_warning.<locals>.update�r�rFr�r�rS)r&r'rr.rYrZr�r�r�s     r�test_no_frame_warningr��sb���l�l�n�G�C����"�"��V�B�u���D�

���k��	5�����
����s�A*�*A3�png)�
extensionsc����|j�}|jddtjz�|j	dd�tj
ddtjzd��|j
gg�\��fd�}��fd�}tj|||dd	d
��}|j�5|jd�ddd�|j�}|jddtjz�|j	dd�|j
�tj�d
z��y#1swY�wxYw)Nr�r	r
rc�.���jgg��fSrr
rs�rrz"test_animation_frame.<locals>.init�rrc�`���j�tj�|dzz���fS)Nr)rrr)rrrs ��rrz%test_animation_frame.<locals>.animate�s)����
�
�a�����A��G��,�-��u�rr!TF)r$r r�r�r�g{�G�z�?)�add_subplotr)r�pir*rr(rr.r�rKr)	r��fig_test�fig_refr0rrr2rrs	       @@r�test_animation_framer�s	���

�	�	�	�B��K�K��1�r�u�u�9���K�K��A��
���A�q�2�5�5�y�#�&�A��G�G�B��O�E�D����"�"��'�T�!�
�%�!�D�
������	�	�*���
�	�	�	�B��K�K��1�r�u�u�9���K�K��A���G�G�A�r�v�v�a�'�k�"�#���s�:E�E)6r��pathlibrrUr�r�r��numpyrrY�
matplotlibr�rr&r�matplotlib.testing.decoratorsr�fixturer2�AbstractMovieWriterr4rOr��parametrizer+r]rjr��registerrmr�r�r�r�skipifr�rs�ImageMagickWriterr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr%rr�<module>rsU��	����
���
��$� �=������B��B�4
�i�3�3�
�6,�$������$�T�"2�!3�v�h��G�	"�H�	"�!�&�����F�#����$��"�
�5�$�����7���G�������$�T�"2�!3�v�h��G�
�H�H�
�*�������F�L�L�����*�*��&�&�2�2�4�4�$�+�&�'��F�L�L��V�[�[�/�/��+�+�7�7�9�9�)�0�+�,�	$�	�������(��
������$�T�"2�!3�v�h��G��H��	� �2������$�d�5��8�n�"=�!>�#)�(��,�7�,�7�4��������V�\�\�"�&�+�+�*<�*<����*�*�3�<�<�8J�+K�L�L�/�+=�+1�2����������$�a�.�!1�V�H��E�/�F�
�/��������V�\�\�"�&�+�+�*<�*<����*�*�3�<�<�8J�+K�L�L�/�+=�+1�2����������$�a�.�!1�V�H��E�7�F�
�7������B�G�G�w�&�/D��E�#�F�#�"�����+�e�T�]�;�*1�<�*1�Z������*��9��9�&�$����(�$�)�$r

Youez - 2016 - github.com/yon3zu
LinuXploit