Current File : //usr/lib64/python2.7/site-packages/numpy/testing/decorators.pyo |
�
E�`Qc @ sq d Z d d l Z d d l Z d d l m Z m Z d � Z e d � Z d d � Z
d d � Z e d � Z d S( s�
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.
i����N( t WarningManagert WarningMessagec C s
t | _ | S( s�
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 consits 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'
( t Truet slow( t t( ( s>