numpy.testing.decorate_methods
- 
numpy.testing.decorate_methods(cls, decorator, testmatch=None)[source]
- 
Apply a decorator to all methods in a class matching a regular expression. The given decorator is applied to all public methods of clsthat are matched by the regular expressiontestmatch(testmatch.search(methodname)). Methods that are private, i.e. start with an underscore, are ignored.Parameters: cls : class Class whose methods to decorate. decorator : function Decorator to apply to methods testmatch : compiled regexp or str, optional The regular expression. Default value is None, in which case the nose default ( re.compile(r'(?:^|[\b_\.%s-])[Tt]est' % os.sep)) is used. Iftestmatchis a string, it is compiled to a regular expression first.
    © 2008–2016 NumPy Developers
Licensed under the NumPy License.
    https://docs.scipy.org/doc/numpy-1.11.0/reference/generated/numpy.testing.decorate_methods.html