← Back
Editing: decorators.cpython-311.pyc
� ���c�, � �| � d Z ddlZddlZddlmZmZmZ g d�Zd� Z dd�Z dd �Zdd �Zdd�Z d� Z ee d � � ZdS )a� Decorators for labeling and modifying behavior of test objects. Decorators that merely return a modified version of the original function object are straightforward. Decorators that return a new function object need to use :: nose.tools.make_decorator(original_function)(decorator) in returning the decorator, in order to preserve meta-data such as function name, setup and teardown functions and so on - see ``nose.tools`` for more information. � N� )�SkipTest�assert_warns�HAS_REFCOUNT)�slow� setastest�skipif�knownfailureif� deprecated�parametrize�_needs_refcountc �L � t j dt d�� � d| _ | S )a� .. deprecated:: 1.21 This decorator is retained for compatibility with the nose testing framework, which is being phased out. Please use the nose2 or pytest frameworks instead. Label a test as 'slow'. The exact definition of a slow test is obviously both subjective and hardware-dependent, but in general any individual test that requires more than a second or two should be labeled as slow (the whole suite consists of thousands of tests, so even a second is significant). Parameters ---------- t : callable The test to label as slow. Returns ------- t : callable The decorated test `t`. Examples -------- The `numpy.testing` module includes ``import decorators as dec``. A test can be decorated as slow like this:: from numpy.testing import * @dec.slow def test_big(self): print('Big, slow test') ��the np.testing.dec decorators are included for nose support, and are deprecated since NumPy v1.21. Use the nose2 or pytest frameworks instead.� �� stacklevelT)�warnings�warn�DeprecationWarningr )�ts �C/usr/lib/python3/dist-packages/numpy/testing/_private/decorators.pyr r s<