Extend numpy’s decorators to use nipy’s gui and data labels.
Factory function to create a decorator that applies one or more labels.
Parameters: | label : str or sequence
ds : str
|
---|---|
Returns: | ldec : function
|
Examples
>>> slow = make_label_dec('slow')
>>> print slow.__doc__
Labels a test as 'slow'
>>> rare = make_label_dec(['slow','hard'],
... "Mix labels 'slow' and 'hard' for rare tests")
>>> @rare
... def f(): pass
...
>>>
>>> f.slow
True
>>> f.hard
True
Skip a test that needs further review.
Parameters: | msg : string
|
---|
Decorator - mark a function or method for skipping its doctest.
This decorator allows you to mark a function whose docstring you wish to omit from testing, while preserving the docstring for introspection, help, etc.