| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -2,6 +2,7 @@ | |
|
|
||
| import copy | ||
| import pickle | ||
| from io import StringIO | ||
| from test.support import findfile | ||
| import unittest | ||
|
|
||
| Expand Down Expand Up | @@ -188,6 +189,14 @@ def testReplaceChildFragment(self): | |
| frag.unlink() | ||
| dom.unlink() | ||
|
|
||
| def testWriteXMLChildFragment(self): | ||
| 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:') | ||
|
Comment thread
Copy link
Copy Markdown
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityUse self.assertEqual() (without the trailing s).
Sorry, something went wrong.
All reactions
|
||
| frag.unlink() | ||
| dom.unlink() | ||
|
|
||
| def testLegalChildren(self): | ||
| dom = Document() | ||
| elem = dom.createElement('element') | ||
| Expand Down Expand Up | @@ -235,8 +244,10 @@ def testNonZero(self): | |
|
|
||
| def testUnlink(self): | ||
| dom = parse(tstfile) | ||
| self.confirm(isinstance(dom, Document)) | ||
| self.assertTrue(dom.childNodes) | ||
| dom.unlink() | ||
| self.confirm(isinstance(dom, Document)) | ||
| self.assertFalse(dom.childNodes) | ||
|
|
||
| def testContext(self): | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityYou could delete unused vars by using dom, *_, frag = ....
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.