### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NumPy v1.7 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Test Support (`numpy.testing`) »

# numpy.testing.decorators.deprecated

`numpy.testing.decorators.``deprecated`(conditional=True)

  Filter deprecation warnings while running the test suite.

  This decorator can be used to filter DeprecationWarning’s, to avoid printing them during the test suite run, while checking that the test actually raises a DeprecationWarning.

  Parameters : | conditional : bool or callable, optional Flag to determine whether to mark test as deprecated or not. If the condition is a callable, it is used at runtime to dynamically make the decision. Default is True.
  Returns : | decorator : function The `deprecated` decorator itself.

  Notes

  New in version 1.4.0.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NumPy v1.7 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Test Support (`numpy.testing`) »