mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-30485: Re-allow empty strings in ElementPath namespace mappings since they might actually be harmless and unused (and thus went undetected previously). (#12830)
This commit is contained in:
parent
cd466559c4
commit
3c5a858ec6
2 changed files with 0 additions and 5 deletions
|
@ -2466,9 +2466,6 @@ class ElementFindTest(unittest.TestCase):
|
|||
nsmap = {'xx': 'X', None: 'Y'}
|
||||
self.assertEqual(len(root.findall(".//xx:b", namespaces=nsmap)), 2)
|
||||
self.assertEqual(len(root.findall(".//b", namespaces=nsmap)), 1)
|
||||
nsmap = {'xx': 'X', '': 'Y'}
|
||||
with self.assertRaisesRegex(ValueError, 'namespace prefix'):
|
||||
root.findall(".//xx:b", namespaces=nsmap)
|
||||
|
||||
def test_bad_find(self):
|
||||
e = ET.XML(SAMPLE_XML)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue