Skip to content

Conversation

@arp11
Copy link

@arp11 arp11 commented May 23, 2017

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

@the-knights-who-say-ni
Copy link

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!

@mention-bot
Copy link

@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.

Copy link
Contributor

@BoboTiG BoboTiG left a 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:')
Copy link
Contributor

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()
Copy link
Contributor

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 = ....

@brettcannon brettcannon reopened this Mar 26, 2019
@brettcannon brettcannon added the type-feature A feature request or enhancement label Mar 26, 2019
@freddrake
Copy link
Member

freddrake commented Apr 3, 2019

I'm not sure why this has languished so long, but I don't remember reading the patch when I first saw bpo-9883 (though it was present).

@arp11: Are you willing to update the patch to resolve the conflicts, even though this has aged a bit?

@csabella
Copy link
Contributor

It looks like @arp11 is no longer active therefore I'm going to close this pull request.

@csabella csabella closed this May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants