-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
bpo-9883: writexml on a DocumentFragment acts on children #1745
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
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
|
@arp11, thanks for your PR! By analyzing the history of the files in this pull request, we identified @loewis, @freddrake and @Yhg1s to be potential reviewers. |
BoboTiG
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
Thank you for the patch. I locally checked and it is working fine.
Could you update the PR to include the news file as well?
| dom, orig, c1, c2, c3, frag = self._create_fragment_test_nodes() | ||
| written = StringIO() | ||
| frag.writexml(writer=written, indent=' ', addindent='-', newl=':') | ||
| self.assertEquals(written.getvalue(), ' foo: bar: bat:') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use self.assertEqual() (without the trailing s).
| dom.unlink() | ||
|
|
||
| def testWriteXMLChildFragment(self): | ||
| dom, orig, c1, c2, c3, frag = self._create_fragment_test_nodes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could delete unused vars by using dom, *_, frag = ....
|
It looks like @arp11 is no longer active therefore I'm going to close this pull request. |
Adds writexml method as well as a test to make sure it works. Since there was no attribute previously, the only behavior change is if a client introspects the available attributes on this node type specifically. There seems to be no other test coverage for writexml whatsoever.
https://bugs.python.org/issue9883