summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2020-02-06 00:46:59 -0800
committerGitHub <noreply@github.com>2020-02-06 09:46:59 +0100
commit2905b41670fda38f970ce4dd1955f486bed928ab (patch)
tree9d0b0a0015b2d2c165aed61b65f9a935e1ed7081 /tests
parent4c6ab1f2aa2a99d17ab308c0156f971a13d3fcaf (diff)
Refs #31233 -- Added "error" filter for RuntimeWarning during tests.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/runtests.py b/tests/runtests.py
index 1282538a6d..a05779010c 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -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')