PyDocs

Nav

Development Tools

check_warnings

  • check_warnings(*filters, quiet=True)
A convenience wrapper for warnings.catch_warnings() that makes it easier to test that a warning was correctly raised. It is approximately equivalent to calling warnings.catch_warnings(record=True) with warnings.simplefilter() set to always and with the option to automatically validate the results that are recorded.
Changed in 3.2
  • 3.2: New optional arguments filters and quiet.
0 Examples
No examples for test.support.warnings_helper/check_warnings.
See Also
No see-alsos for test.support.warnings_helper/check_warnings
0 Notes
No notes for check_warnings