mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
bpo-30485: Change the prefix for defining the default namespace in ElementPath from None to '' since there is existing code that uses that and it's more convenient to have an all-string-keys dict (e.g. when sorting items etc.). (#12860)
This commit is contained in:
parent
7e954e7de4
commit
e8113f51a8
4 changed files with 7 additions and 11 deletions
|
@ -2463,7 +2463,7 @@ class ElementFindTest(unittest.TestCase):
|
|||
nsmap = {'xx': 'Y'}
|
||||
self.assertEqual(len(root.findall(".//xx:b", namespaces=nsmap)), 1)
|
||||
self.assertEqual(len(root.findall(".//b", namespaces=nsmap)), 2)
|
||||
nsmap = {'xx': 'X', None: 'Y'}
|
||||
nsmap = {'xx': 'X', '': 'Y'}
|
||||
self.assertEqual(len(root.findall(".//xx:b", namespaces=nsmap)), 2)
|
||||
self.assertEqual(len(root.findall(".//b", namespaces=nsmap)), 1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue