diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-03-25 09:51:14 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-03-25 09:51:14 +0100 |
commit | 6c45d397a32a1f887dc5ed1565b57bf570ded1a0 (patch) | |
tree | 71d366513138a54588abf9e5d9177927e05ba8d0 | |
parent | a6d865c128dd46a067358e94c29ca2d84205ae89 (diff) | |
download | cpython-git-6c45d397a32a1f887dc5ed1565b57bf570ded1a0.tar.gz |
Issue #21925: Fix test_warnings for release mode
Use -Wd comment line option to log the ResourceWarning.
-rw-r--r-- | 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 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)) |