ó °¿v]c@`sfdZddlmZmZmZddlZddlZdgZd„Zde fd„ƒYZ dS(se 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__).test 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 explicily 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 develop mode. That includes the standard ``python runtests.py`` invocation. 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. i(tdivisiontabsolute_importtprint_functionNt PytestTestercC`sIddl}td|jƒ|jdddƒjj}td|ƒdS( NisNumPy version %si itordertCs&NumPy relaxed strides checking option:(i i(tnumpytprintt __version__tonestflagst f_contiguous(tnptrelaxed_strides((sc/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/_pytesttester.pyt_show_numpy_info's cB`s5eZdZd„Zdddeeddd„ZRS(sI Pytest test runner. This class is made available in ``numpy.testing``, and a test function is typically added to a package's __init__.py like so:: from numpy.testing 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. cC`s ||_dS(N(t module_name(tselfR((sc/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/_pytesttester.pyt__init__Hstfastiiÿÿÿÿc C`sddl}ddl} tj|j} tjj| jdƒ} dg} | dg7} | j ƒ"| j dƒddl m } WdQX| ddd d g7} | d g7} | d d ddddddg7} |rát dƒ‚n|rú| t|ƒ7} n|dkr"| dd|dg7} n|r<| d| g7} n|dkr[| ddg7} n|dkrz| d|g7} n|dkrš| d|g7} n|dkrµ|jg}n| dgt|ƒ7} tƒy|j| ƒ}Wntk r}|j}nX|dkS(s 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 iNs-ls-qtalways(tcpuinfos!-W ignore:Not importing directorys"-W ignore:numpy.dtype size changeds"-W ignore:numpy.ufunc size changeds-W ignore::UserWarning:cpuinfos$-W ignore:the matrix subclass is notsE-W ignore:sys\.exc_clear\(\) not supported in 3\.x:DeprecationWarnings2-W ignore:in 3\.x, __setslice__:DeprecationWarnings2-W ignore:in 3\.x, __getslice__:DeprecationWarnings=-W ignore:buffer\(\) not supported in 3\.x:DeprecationWarningsB-W ignore:CObject type is not supported in 3\.x:DeprecationWarningsJ-W ignore:comparing unequal types not supported in 3\.x:DeprecationWarningsP-W ignore:the commands module has been removed in Python 3\.0:DeprecationWarningsM-W ignore:The 'new' module has been removed in Python 3\.0:DeprecationWarningsDoctests not supportedit-tvs--cov=Rs-msnot slowtfulls--durations=%ss--pyargs(tpytesttwarningstsystmodulesRtostpathtabspatht__path__tcatch_warningst simplefiltertnumpy.distutilsRt ValueErrortlisttNoneRtmaint SystemExittcode(Rtlabeltverboset extra_argvtdocteststcoveraget durationsttestsRRtmodulet module_patht pytest_argsRR(texc((sc/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/_pytesttester.pyt__call__Ks`/               N(t__name__t __module__t__doc__RR%tFalseR4(((sc/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/_pytesttester.pyR/s  ( R7t __future__RRRRRt__all__RtobjectR(((sc/home/ec2-user/environment/lambda-staging/venv/lib64/python2.7/dist-packages/numpy/_pytesttester.pyts