| 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 : |
�
���c�K � �p � d Z ddlZddlZddlZddlZddlmZmZ g d�Z d� Z
dd�Z G d� d � � Zd
� Z
dS )ze
Nose test running.
This module implements ``test()`` and ``bench()`` functions for NumPy modules.
� N� )�import_nose�suppress_warnings)�get_package_name�run_module_suite�
NoseTester�
_numpy_testerr r r c �x � | dd� }g }d| v sd| v rDt j � | � � \ } }|dv rn|� |� � d| v �@d| v �D|sd|v rdS dS |� � � |d � d� � r|� d� � d � |� � S )
a&
Given a path where a package is installed, determine its name.
Parameters
----------
filepath : str
Path to a file. If the determination fails, "numpy" is returned.
Examples
--------
>>> np.testing.nosetester.get_package_name('nonsense')
'numpy'
N�
site-packages�
dist-packages)r r �scipy�numpyr z.egg�.)�os�path�split�append�reverse�endswith�pop�join)�filepath�fullpath�pkg_name�p2s �C/usr/lib/python3/dist-packages/numpy/testing/_private/nosetester.pyr r s� � � ����{�H��H�
�X�
%�
%��H�)D�)D��w�}�}�X�.�.���"�
�3�3�3��������� �X�
%�
%��H�)D�)D� � ��h����7��7�
������ ��{���F�#�#� ����Q�����8�8�H���� c � � | �8t j d� � }|j � dd� � } | �t �|�t j | gz }n|| gz }t
� � }ddlm} |� | |� � g�� � dS )a�
Run a test module.
Equivalent to calling ``$ nosetests <argv> <file_to_run>`` from
the command line
Parameters
----------
file_to_run : str, optional
Path to test module, or None.
By default, run the module from which this function is called.
argv : list of strings
Arguments to be passed to the nose test runner. ``argv[0]`` is
ignored. All command line arguments accepted by ``nosetests``
will work. If it is the default value None, sys.argv is used.
.. versionadded:: 1.9.0
Examples
--------
Adding the following::
if __name__ == "__main__" :
run_module_suite(argv=sys.argv)
at the end of a test module will run the tests when that module is
called in the python interpreter.
Alternatively, calling::
>>> run_module_suite(file_to_run="numpy/tests/test_matlib.py") # doctest: +SKIP
from an interpreter will run all the test routine in 'test_matlib.py'.
Nr �__file__)�KnownFailurePlugin��argv�
addplugins)
�sys� _getframe�f_locals�get�AssertionErrorr"