Refs #31233 -- Added "error" filter for RuntimeWarning during tests.

This commit is contained in:
Jon Dufresne 2020-02-06 00:46:59 -08:00 committed by GitHub
parent 4c6ab1f2aa
commit 2905b41670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ else:
# Make deprecation warnings errors to ensure no usage of deprecated features.
warnings.simplefilter("error", RemovedInDjango40Warning)
# Make runtime warning errors to ensure no usage of error prone patterns.
# Make resource and runtime warning errors to ensure no usage of error prone
# patterns.
warnings.simplefilter("error", ResourceWarning)
warnings.simplefilter("error", RuntimeWarning)
# Ignore known warnings in test dependencies.
warnings.filterwarnings("ignore", "'U' mode is deprecated", DeprecationWarning, module='docutils.io')