
    Kh                     8    S r SSKrSSKrS/rS r " S S5      rg)a  
Pytest test running.

This module implements the ``test()`` function for NumPy modules. The usual
boiler plate for doing that is to put the following in the module
``__init__.py`` file::

    from numpy._pytesttester import PytestTester
    test = PytestTester(__name__)
    del PytestTester


Warnings filtering and other runtime settings should be dealt with in the
``pytest.ini`` file in the numpy repo root. The behavior of the test depends on
whether or not that file is found as follows:

* ``pytest.ini`` is present (develop mode)
    All warnings except those explicitly filtered out are raised as error.
* ``pytest.ini`` is absent (release mode)
    DeprecationWarnings and PendingDeprecationWarnings are ignored, other
    warnings are passed through.

In practice, tests run from the numpy repo are run in development mode with
``spin``, through the standard ``spin test`` invocation or from an inplace
build with ``pytest numpy``.

This module is imported by every numpy subpackage, so lies at the top level to
simplify circular import issues. For the same reason, it contains no numpy
imports at module scope, instead importing numpy within function calls.
    NPytestTesterc                      SS K n [        SU R                  -  5        U R                  R                  R                  5       n[        SU(       a  U5        g S5        g )Nr   zNumPy version %szNumPy CPU features: znothing enabled)numpyprint__version__lib_utils_impl	_opt_info)npinfos     E/var/www/html/env/lib/python3.13/site-packages/numpy/_pytesttester.py_show_numpy_infor   %   sB    	
r~~
-.66'')D	
 44H5FH    c                   ,    \ rS rSrSrS r  SS jrSrg)r   -   as  
Pytest test runner.

A test function is typically added to a package's __init__.py like so::

  from numpy._pytesttester import PytestTester
  test = PytestTester(__name__).test
  del PytestTester

Calling this test function finds and runs all tests associated with the
module and all its sub-modules.

Attributes
----------
module_name : str
    Full path to the package to test.

Parameters
----------
module_name : module name
    The name of the module to test.

Notes
-----
Unlike the previous ``nose``-based implementation, this class is not
publicly exposed as it performs some ``numpy``-specific warning
suppression.

c                     Xl         Xl        g )N)module_name
__module__)selfr   s     r   __init__PytestTester.__init__K   s    &%r   Nc                 \   SSK nSSKn	[        R                  U R                     n
[
        R                  R                  U
R                  S   5      nS/nUS/-  n[        R                  S:  a0  U	R                  5          U	R                  S5        SSKJn  SSS5        U/ SQ-  nUS	S
/-  nU(       a  US/-  nU(       a  U[        U5      -  nUS:  a  USSUS-
  -  -   /-  nU(       a	  USU-   /-  nUS:X  a  SSKJn  U(       a  USS/-  nOUSS/-  nOUS:w  a  USU/-  nUS:  a	  USU-  /-  nUc  U R                  /nUS/[        U5      -   -  n[#        5          UR%                  U5      nUS:H  $ ! , (       d  f       N= f! [&         a  nUR(                  n SnAUS:H  $ SnAff = f)a  
Run tests for module using pytest.

Parameters
----------
label : {'fast', 'full'}, optional
    Identifies the tests to run. When set to 'fast', tests decorated
    with `pytest.mark.slow` are skipped, when 'full', the slow marker
    is ignored.
verbose : int, optional
    Verbosity value for test outputs, in the range 1-3. Default is 1.
extra_argv : list, optional
    List with any extra arguments to pass to pytests.
doctests : bool, optional
    .. note:: Not supported
coverage : bool, optional
    If True, report coverage of NumPy code. Default is False.
    Requires installation of (pip) pytest-cov.
durations : int, optional
    If < 0, do nothing, If 0, report time of all tests, if > 0,
    report the time of the slowest `timer` tests. Default is -1.
tests : test or list of tests
    Tests to be executed with pytest '--pyargs'

Returns
-------
result : bool
    Return True on success, false otherwise.

Notes
-----
Each NumPy module exposes `test` in its namespace to run all tests for
it. For example, to run all tests for numpy.lib:

>>> np.lib.test() #doctest: +SKIP

Examples
--------
>>> result = np.lib.test() #doctest: +SKIP
...
1023 passed, 2 skipped, 6 deselected, 1 xfailed in 10.39 seconds
>>> result
True

r   Nz-lz-q)      always)cpuinfo)z!-W ignore:Not importing directoryz"-W ignore:numpy.dtype size changedz"-W ignore:numpy.ufunc size changedz-W ignore::UserWarning:cpuinfoz$-W ignore:the matrix subclass is notz(-W ignore:Importing from numpy.matlib isz--doctest-modules   -vz--cov=fast)IS_PYPYz-mznot slow and not slow_pypyznot slowfullz--durations=%sz--pyargs)pytestwarningssysmodulesr   ospathabspath__path__version_infocatch_warningssimplefilternumpy.distutilsr   listnumpy.testingr!   r   main
SystemExitcode)r   labelverbose
extra_argvdoctestscoverage	durationstestsr#   r$   modulemodule_pathpytest_argsr   r!   r3   excs                    r   __call__PytestTester.__call__O   s   ^ 	T--.ggoofooa&89 f 	vg%((*%%h/ 4 + 	  	 	26 	
 /00K4
++KQ;C#w{"3344KH{233KF?-&BCCj11f_D%=(K>,y899K=%%&E
|d5k11 		;;{+D qy{ +*t  	88Dqy	s$   ?E6 F 6
F
F+F&&F+)r   r   )r    r   NFFN)__name__r   __qualname____firstlineno____doc__r   r?   __static_attributes__ r   r   r   r   -   s    :& <@EIyr   )rE   r%   r'   __all__r   r   rG   r   r   <module>rI      s,   <  	
I[ [r   