403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/numpy/testing/_private/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/numpy/testing/_private/__pycache__/noseclasses.cpython-311.pyc
�

���c�8����ddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZddlm
Z
ddlmZddlmZddlmZmZGd	�d
ej��ZGd�dej��ZGd
�dej��Zej��ZGd�dej��ZGd�d��ZGd�de��Z e Z!Gd�de
��Z"Gd�dej#j$��Z%dS)�N)�doctests)�
ErrorClass�ErrorClassPlugin)�Plugin)�src�)�get_package_name)�KnownFailureException�KnownFailureTestc��eZdZd�Zd�ZdS)�NumpyDocTestFinderc��|�dStj|��r|j|juStj|��r|j|jkStj|��r|j|jkStj|��r|j|j	j
jkStj|���|tj|��uSt|d��r|j|jkSt|t��rdStd���)zY
        Return true if the given object is defined in the given
        module.
        NT�
__module__z"object must be a class or function)�inspect�
isfunction�__dict__�__globals__�	isbuiltin�__name__r�isclass�ismethod�__self__�	__class__�	getmodule�hasattr�
isinstance�property�
ValueError)�self�module�objects   �D/usr/lib/python3/dist-packages/numpy/testing/_private/noseclasses.py�_from_modulezNumpyDocTestFinder._from_modules��
�>��4�
�
��
'�
'�	C��?�f�&8�8�8�
�
�v�
&�
&�	C��?�f�&7�7�7�
�_�V�
$�
$�	C��?�f�&7�7�7�
�
�f�
%�
%�
	C�
�?�f�o�&?�&J�J�J�
�
�v�
&�
&�
2��W�.�v�6�6�6�6�
�V�\�
*�
*�	C��?�f�&7�7�7�
���
)�
)�	C��4��A�B�B�B�c
�P�tj�||||||||��ddlm}m}	m}
m}m}|
|��rt|j	rm|j
���D]S\}
}|�d|
��}||��s|	|��r1|�||��r|�|||||||���T|	|��r�|j	r�|j
���D]�\}
}t|t��rt||
��}t|t ��rt||
��j}||��s+|	|��s ||��st|t$��r8|�||��r"|�d|
��}
|�|||
||||����dSdSdS)zm
        Find tests for the given object and any contained objects, and
        add them to `tests`.
        r)�	isroutiner�ismodulerr�.N)�doctest�
DocTestFinder�_findrr&rr'rr�_recurser�itemsr#r�staticmethod�getattr�classmethod�__func__r)r�tests�obj�namer �source_lines�globs�seenr&rr'rr�valname�val�valname1s                r"r+zNumpyDocTestFinder._find:sY��	��#�#�D�%��d�F�$0�%��	?�	?�	?�	�	�	�	�	�	�	�	�	�	�	�	�	�	�
�8�C�=�=�	,�T�]�	,� #�� 2� 2� 4� 4�
,�
,����"�.�.�W�.�.���i��n�n�,������,��*�*�6�3�7�7�,��J�J�u�c�8�V�\�$�d�,�,�,���7�3�<�<�	,�D�M�	,� #�� 2� 2� 4� 4�

,�

,�����c�<�0�0�0�!�#�w�/�/�C��c�;�/�/�9�!�#�w�/�/�8�C� �Z��_�_�,������,��X�c�]�]�,�&0��h�&?�&?�,��'�'���4�4�,�"&�1�1��1�1�G��J�J�u�c�7�F�L�$�d�,�,�,��	,�	,�	,�	,�

,�

,r$N)rr�__qualname__r#r+�r$r"r
r
s5������C�C�C�8+,�+,�+,�+,�+,r$r
c��eZdZd�ZdS)�NumpyOutputCheckerc�d�tj�||||��}|s�d|vrdS|�dd��}|�dd��}dD]4}|�d|zd��}|�d|zd��}�5tj�||||��}|S)Nz#randomTz'>z'<)��z'<i%d'�int)r)�
OutputChecker�check_output�replace)r�want�got�optionflags�ret�szs      r"rDzNumpyOutputChecker.check_outputls����#�0�0��t�S�1<�>�>���	&��D� � ��t��+�+�d�D�)�)�C��<�<��d�+�+�D��
:�
:���k�k�(�R�-��7�7���|�|�H�r�M�5�9�9����'�4�4�T�4���&�&�C��
r$N)rrr;rDr<r$r"r>r>ks#����������r$r>c��eZdZ		dd�ZdS)�NumpyDocTestCaserN�_c�l�||_||_tj�||||||���dS)N)rH�setUp�tearDown�checker)�_result_var�	_nose_objr)�DocTestCase�__init__)r�testrHrOrPrQr3�
result_vars        r"rUzNumpyDocTestCase.__init__�sJ��%��������$�$�T�4�1<�+0�8�-4�	%�	6�	6�	6�	6�	6r$)rNNNNrM)rrr;rUr<r$r"rLrL�s.������AE�47�6�6�6�6�6�6r$rLc�z�eZdZdZdZejejzZddgZ	e
ZeZ
eZejfd�Zd�Zd�Zd�Zd	�Zd
�ZdS)�NumpyDoctest�numpydoctesti�zgenerate_numpy_api.pyzsetup.pyc�N�tj|||��d|_d|_dS)NT)r�options�
doctest_tests�doctest_result_var�r�parser�envs   r"r\zNumpyDoctest.options�s0����t�V�S�)�)�)�"���#'����r$c���tj|||��|���|_t	j��|_|jr"d�|jjD��|j_dSdS)Nc�(�g|]}|jdk�
|��S�r))r4)�.0�ps  r"�
<listcomp>z*NumpyDoctest.configure.<locals>.<listcomp>�s.��&>�&>�&>�A�)*��9�)<�)<�'(�)<�)<�)<r$)	r�	configure�test_finder_class�finderr)�
DocTestParserr`�enabled�plugins�rr\�configs   r"rhzNumpyDoctest.configure�s{�����w��/�/�/��,�,�.�.����+�-�-����<�	>�
&>�&>���1G�&>�&>�&>�F�N�"�"�"�	>�	>r$c��ttj�|j����}t
ddtd�|_d|vr?|�d��}|d}t||ji|g��|j|<dSdS)a` Configure `test` object to set test context

        We set the numpy / scipy standard doctest namespace

        Parameters
        ----------
        test : test object
            with ``globs`` dictionary defining namespace

        Returns
        -------
        None

        Notes
        -----
        `test` object modified in place
        �__main__)�__builtins__�__file__r�np�scipyr(���N)
r	�os�path�dirname�filenamerr�numpyr6�split�
__import__)rrV�pkg_namerf�p2s     r"�set_test_contextzNumpyDoctest.set_test_context�s���&$�B�G�O�O�D�M�$B�$B�C�C��&2�!+�!+� �"�"��
�
�h������s�#�#�A��2��B�'��$�*�b�2�$�G�G�D�J�r�N�N�N��r$c#�K�|�|j��s"tj�d|��dS	|j�|��}n#t$rYdSwxYw|sdS|���t|j
��}|D]d}|js�
|js||_|�
|��|�||j|���|j���V��edS)NzDoctest doesn't want module %s)rHrQrW)�matchesr�npd�log�debugrj�find�AttributeError�sortrrs�examplesrzr��doctest_case_class�doctest_optflags�out_check_classr^)rr r2�module_filerVs     r"�loadTestsFromModulez NumpyDoctest.loadTestsFromModule�sA�����|�|�F�O�,�,�	��G�M�M�:�F�C�C�C��F�	��K�$�$�V�,�,�E�E���	�	�	�
�F�F�	�����	��F�
�
�
�����&�/�*�*���
	N�
	N�D��=�
���=�
,� +��
��!�!�$�'�'�'��)�)�$�6:�6K�26�2F�2F�2H�2H�59�5L�*�N�N�
N�
N�
N�
N�
	N�
	Ns�A�
A)�(A)c�2�tjdit��dS)Nr<)r{�set_printoptions�print_state)rs r"�afterContextzNumpyDoctest.afterContexts��
��-�-��-�-�-�-�-r$c��tj�|��}||jvrdStj�||��S)NF)rwrx�basename�doctest_ignorer��Doctest�wantFile)r�file�bns   r"r�zNumpyDoctest.wantFilesB��
�W�
�
�d�
#�
#��
��$�$�$��5��{�#�#�D�$�/�/�/r$N)rrr;r4�scorer)�NORMALIZE_WHITESPACE�ELLIPSISr�r�rLr�r>r�r
rirw�environr\rhr�r�r�r�r<r$r"rYrY�s��������D��E��3�g�6F�F��.� �"�N�*��(�O�*��#%�*�'�'�'�'�>�>�>�%H�%H�%H�TN�N�N�8.�.�.�0�0�0�0�0r$rYc�2�eZdZdZdZdZdZd
d�Zd�Zd�Z	d	S)�	Unpluggerzi Nose plugin to remove named plugin late in loading

    By default it removes the "doctest" plugin.
    �	unpluggerTi�r)c��||_dS�N)�	to_unplug)rr�s  r"rUzUnplugger.__init__s
��"����r$c��dSr�r<r_s   r"r\zUnplugger.optionss���r$c�L���fd�|jjD��|j_dS)Nc�4��g|]}|j�jk�|��Sr<)r4r�)rerfrs  �r"rgz'Unplugger.configure.<locals>.<listcomp>s1���"?�"?�"?��%&�V�t�~�%=�%=�#$�%=�%=�%=r$)rmrns`  r"rhzUnplugger.configures:���"?�"?�"?�"?�V�^�-C�"?�"?�"?�����r$Nrd)
rrr;�__doc__r4rlr�rUr\rhr<r$r"r�r�
sa���������D��G��E�#�#�#�#�
�
�
�?�?�?�?�?r$r�c�L�eZdZdZdZeedd���Zej	fd�Z
d�ZdS)	�KnownFailurePlugina1Plugin that installs a KNOWNFAIL error class for the
    KnownFailureClass exception.  When KnownFailure is raised,
    the exception will be logged in the knownfail attribute of the
    result, 'K' or 'KNOWNFAIL' (verbose) will be output, and the
    exception will not be counted as an error or failure.T�	KNOWNFAILF)�label�	isfailurec	�f�d}|�ddd|�|d��d���dS)N�NOSE_WITHOUT_KNOWNFAILz--no-knownfail�
store_true�noKnownFailFz3Disable special handling of KnownFailure exceptions)�action�dest�default�help)�
add_option�get)rr`ra�env_opts    r"r\zKnownFailurePlugin.options-sK��*�����*�<�,�c�g�g�g�u�6M�6M� ,�	�	-�	-�	-�	-�	-r$c�^�|jsdS||_t|dd��}|r	d|_dSdS)Nr�F)�
can_configure�confr/rl)rr\r��disables    r"rhzKnownFailurePlugin.configure4sG���!�	��F���	��'�=�%�8�8���	!� �D�L�L�L�	!�	!r$N)rrr;r�rlrr
�	knownfailrwr�r\rhr<r$r"r�r�"sn������=�=�
�G��
�0�!,�%*�,�,�,�I�#%�*�-�-�-�-�!�!�!�!�!r$r�c��eZdZdZd�ZdS)�FPUModeCheckPluginzx
    Plugin that checks the FPU mode before and after each test,
    raising failures if the test changed the mode.
    c�"���ddlm���fd�}|S)Nr)�get_fpu_modec������}��|�����}||kr\	td�||�����#t$r+|��t	j����YdSwxYwdS)Nz6FPU mode changed from {0:#x} to {1:#x} during the test)rV�AssertionError�format�
addFailure�sys�exc_info)�result�old_mode�new_moder�rVs   ��r"�runz/FPUModeCheckPlugin.prepareTestCase.<locals>.runHs����#�|�~�~�H��I�I�f����#�|�~�~�H��8�#�#�<�(��%�v�h��9�9�;�;�;��&�<�<�<��%�%�d�C�L�N�N�;�;�;�;�;�;�<����$�#s�#A�1B
�	B
)�numpy.core._multiarray_testsr�)rrVr�r�s ` @r"�prepareTestCasez"FPUModeCheckPlugin.prepareTestCaseEs;����=�=�=�=�=�=�	<�	<�	<�	<�	<�	<��
r$N)rrr;r�r�r<r$r"r�r�?s-��������
����r$r�c��eZdZd�ZdS)�NumpyTestProgramc�|�|j�@tj�|jj|jj|j���|_|jj�|j��}|�||_|j�	|j
��|_|j���|_
|j
S)aRun Tests. Returns true on success, false on failure, and
        sets self.success to the same value.

        Because nose currently discards the test result object, but we need
        to return it to the user, override TestProgram.runTests to retain
        the result
        N)�stream�	verbosityro)�
testRunner�nose�core�TextTestRunnerror�r�rm�prepareTestRunnerr�rVr��
wasSuccessful�success)r�plug_runners  r"�runTestszNumpyTestProgram.runTests[s����?�"�"�i�6�6�d�k�>P�AE��AV�>B�k�7�K�K�D�O��k�)�;�;�D�O�L�L���"�)�D�O��o�)�)�$�)�4�4����{�0�0�2�2����|�r$N)rrr;r�r<r$r"r�r�Zs#����������r$r�)&rwr�r)rr{r��nose.pluginsrr��nose.plugins.errorclassrr�nose.plugins.baser�	nose.utilr�
nosetesterr	�utilsr
rr*r
rCr>rTrL�get_printoptionsr�r�rYr�r��KnownFailurer�r��TestProgramr�r<r$r"�<module>r�sH��
�	�	�	�
�
�
�
�����������������(�(�(�(�(�(�@�@�@�@�@�@�@�@�$�$�$�$�$�$�������(�(�(�(�(�(�:�:�:�:�:�:�:�:�I,�I,�I,�I,�I,��.�I,�I,�I,�^������.����:6�6�6�6�6�s��6�6�6�%�e�$�&�&��u0�u0�u0�u0�u0�3�;�u0�u0�u0�p?�?�?�?�?�?�?�?�*!�!�!�!�!�)�!�!�!�4"�����������6�����t�y�,�����r$

Youez - 2016 - github.com/yon3zu
LinuXploit