PyDocs

Development Tools

test.support.warnings_helper

The test.support.warnings_helper module provides support for warnings tests.
Symbols in test.support.warnings_helper

c

check_no_resource_warning
Context manager to check that no ResourceWarning was raised.
check_syntax_warning
Test for syntax warning in statement by attempting to compile statement.
check_warnings
A convenience wrapper for warnings.catch_warnings() that makes it easier to test that a warning was correctly raised.

i

ignore_warnings
Suppress warnings that are instances of category, which must be Warning or a subclass.

w

WarningsRecorder
Class used to record warnings for unit tests.