summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-03-25 09:51:14 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-03-25 09:51:14 +0100
commitb0f78fd000d9fe2ee7d7264f73745995fe1ab6c6 (patch)
treed692232bb3d087f54cfe8d90ef1df0ef071598c1 /Lib
parent3dbbf555fc59830dc887f4e3a6b76073b576319a (diff)
downloadcpython-b0f78fd000d9fe2ee7d7264f73745995fe1ab6c6.tar.gz
Issue #21925: Fix test_warnings for release mode
Use -Wd comment line option to log the ResourceWarning.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_warnings/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py
index 9f1cd7574f..42c76035c3 100644
--- a/Lib/test/test_warnings/__init__.py
+++ b/Lib/test/test_warnings/__init__.py
@@ -1007,12 +1007,12 @@ a=A()
# don't import the warnings module
# (_warnings will try to import it)
code = "f = open(%a)" % __file__
- rc, out, err = assert_python_ok("-c", code)
+ rc, out, err = assert_python_ok("-Wd", "-c", code)
self.assertTrue(err.startswith(expected), ascii(err))
# import the warnings module
code = "import warnings; f = open(%a)" % __file__
- rc, out, err = assert_python_ok("-c", code)
+ rc, out, err = assert_python_ok("-Wd", "-c", code)
self.assertTrue(err.startswith(expected), ascii(err))