treat_deprecations_as_exceptions

astropy.tests.helper.treat_deprecations_as_exceptions()[source] [edit on github]

Turn all DeprecationWarnings (which indicate deprecated uses of Python itself or Numpy, but not within Astropy, where we use our own deprecation warning class) into exceptions so that we find out about them early.

This completely resets the warning filters and any “already seen” warning state.