8000 gh-131938: Update error message for `Element.remove()` when an element is not found by picnixz · Pull Request #131972 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-131938: Update error message for Element.remove() when an element is not found #131972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 4, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Lib/test/test_xml_etree.py
  • Loading branch information
picnixz authored Apr 1, 2025
commit 4ec39bd74b7febf8aab9cf35ed770728f9ed67d1
3 changes: 2 additions & 1 deletion Lib/test/test_xml_etree.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ def test_simpleops(self):
self.serialize_check(element, '<tag key="value"><subtag /></tag>') # 4
element.remove(subelement)
self.serialize_check(element, '<tag key="value" />') # 5
with self.assertRaisesRegex(ValueError, r'remove\(.+\): .+not found'):
with self.assertRaisesRegex(ValueError,
r'Element\.remove\(.+\): element not found'):
element.remove(subelement)
self.serialize_check(element, '<tag key="value" />') # 6
element[0:0] = [subelement, subelement, subelement]
Expand Down
Loading
0