summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-07 03:43:17 (GMT)
committerGitHub <noreply@github.com>2024-06-07 03:43:17 (GMT)
commit56a7e0483436d1ebd2af97c02defe0e67c4bb495 (patch)
tree04b0c8ad8d4db46be7c8da2668301538345ee994 /Lib/test
parentd4566c0cfcc2f3db8fa61b35f99260c184416ba4 (diff)
downloadcpython-56a7e0483436d1ebd2af97c02defe0e67c4bb495.zip
cpython-56a7e0483436d1ebd2af97c02defe0e67c4bb495.tar.gz
cpython-56a7e0483436d1ebd2af97c02defe0e67c4bb495.tar.bz2
[3.13] gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762) (GH-120189)
gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762) Adjust DeprecationWarning when testing element truth values in ElementTree, we're planning to go with the more natural True return rather than a disruptive harder to code around exception raise, and are deferring the behavior change for a few more releases. (cherry picked from commit 6b606522ca97488aad6fe2f193d4511e7a8f8334) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_xml_etree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
index bae61f7..3d9141f 100644
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -4088,7 +4088,7 @@ class BoolTest(unittest.TestCase):
def test_warning(self):
e = ET.fromstring('<a style="new"></a>')
msg = (
- r"Testing an element's truth value will raise an exception in "
+ r"Testing an element's truth value will always return True in "
r"future versions. "
r"Use specific 'len\(elem\)' or 'elem is not None' test instead.")
with self.assertWarnsRegex(DeprecationWarning, msg):