[Python-checkins] cpython: Issue #21925: Fix test_warnings for release mode
victor.stinner
python-checkins at python.org
Fri Mar 25 04:51:53 EDT 2016
https://hg.python.org/cpython/rev/307ba4afd0a6
changeset: 100736:307ba4afd0a6
user: Victor Stinner <victor.stinner at gmail.com>
date: Fri Mar 25 09:51:14 2016 +0100
summary:
Issue #21925: Fix test_warnings for release mode
Use -Wd comment line option to log the ResourceWarning.
files:
Lib/test/test_warnings/__init__.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py
--- a/Lib/test/test_warnings/__init__.py
+++ b/Lib/test/test_warnings/__init__.py
@@ -1007,12 +1007,12 @@
# 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))
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list