[Checkins] SVN: zope.etree/trunk/src/zope/etree/ Removed some
unused doctests and a TODO file.
Michael Kerrin
michael.kerrin at openapp.biz
Wed Apr 4 14:07:16 EDT 2007
Log message for revision 74008:
Removed some unused doctests and a TODO file.
Changed:
D zope.etree/trunk/src/zope/etree/TODO.txt
U zope.etree/trunk/src/zope/etree/etree.py
-=-
Deleted: zope.etree/trunk/src/zope/etree/TODO.txt
===================================================================
--- zope.etree/trunk/src/zope/etree/TODO.txt 2007-04-04 17:03:35 UTC (rev 74007)
+++ zope.etree/trunk/src/zope/etree/TODO.txt 2007-04-04 18:07:15 UTC (rev 74008)
@@ -1,18 +0,0 @@
-+ add comments into this interface.
-
-+ extend this interface to each of the different element tree engines. So
- some example lxml supports things that the original elementtree
- implementation did and vice versa. This way developers can say give me
- an elementtree implementation support feature X. But we still need to be
- carefull that we still have a common base interface from which to work
- off.
-
-+ Figure out how to use Python eggs for installation.
-
-+ Is it possible to configure which zope.etree-configure.zcml to use when
- running the unit tests, as otherwise people will need to make local
- modifications to their zope.etree checkout.
-
-+ Figure if there is some ZCML magic we can use in order to register
- a module directly has a uiltity so that there can be no bugs in my proxy
- objects.
Modified: zope.etree/trunk/src/zope/etree/etree.py
===================================================================
--- zope.etree/trunk/src/zope/etree/etree.py 2007-04-04 17:03:35 UTC (rev 74007)
+++ zope.etree/trunk/src/zope/etree/etree.py 2007-04-04 18:07:15 UTC (rev 74008)
@@ -73,64 +73,6 @@
class EtreeEtree(BaseEtree):
- """
- Support for ElementTree
-
- >>> from cStringIO import StringIO
- >>> from zope.interface.verify import verifyObject
- >>> letree = EtreeEtree()
- >>> verifyObject(IEtree, letree)
- True
-
- >>> letree.Comment(u'some text') #doctest:+ELLIPSIS
- <Element <function Comment at ...
-
- >>> letree.Element(u'testtag')
- <Element...
-
- >>> letree.ElementTree() #doctest:+ELLIPSIS
- <elementtree.ElementTree.ElementTree instance at ...
-
- >>> letree.XML(u'<p>some text</p>')
- <Element p ...
-
- >>> letree.fromstring(u'<p>some text</p>')
- <Element p ...
-
- >>> elem = letree.Element(u'testtag')
- >>> letree.iselement(elem)
- 1
-
- >>> f = StringIO('<b>Test Source String</b>')
- >>> letree.parse(f) #doctest:+ELLIPSIS
- <elementtree.ElementTree.ElementTree instance at ...
-
- >>> letree.QName('http://example.namespace.org', 'test')#doctest:+ELLIPSIS
- <elementtree.ElementTree.QName instance at...
-
- >>> print letree.tostring(elem, 'ascii')
- <?xml version='1.0' encoding='ascii'?>
- <testtag />
-
- >>> letree.TreeBuilder()
- Traceback (most recent call last):
- ...
- NotImplementedError: lxml doesn't implement TreeBuilder
-
- >>> subel = letree.SubElement(elem, 'foo')
- >>> letree.tostring(elem)
- '<testtag><foo /></testtag>'
-
- >>> letree.PI('sometarget') #doctest:+ELLIPSIS
- <Element <function ProcessingInstruction at ...
-
- >>> letree.ProcessingInstruction('sometarget') #doctest:+ELLIPSIS
- <Element <function ProcessingInstruction at ...
-
- >>> letree.XMLTreeBuilder()
- <elementtree.ElementTree.XMLTreeBuilder instance at ...
-
- """
implements(IEtree)
def __init__(self):
@@ -155,64 +97,6 @@
class EtreePy25(BaseEtree):
- """
- Support for ElementTree
-
- >>> from cStringIO import StringIO
- >>> from zope.interface.verify import verifyObject
- >>> letree = EtreePy25()
- >>> verifyObject(IEtree, letree)
- True
-
- >>> letree.Comment(u'some text') #doctest:+ELLIPSIS
- <Element <function Comment at ...
-
- >>> letree.Element(u'testtag')
- <Element...
-
- >>> letree.ElementTree() #doctest:+ELLIPSIS
- <xml.etree.ElementTree.ElementTree instance at ...
-
- >>> letree.XML(u'<p>some text</p>')
- <Element p ...
-
- >>> letree.fromstring(u'<p>some text</p>')
- <Element p ...
-
- >>> elem = letree.Element(u'testtag')
- >>> letree.iselement(elem)
- 1
-
- >>> f = StringIO('<b>Test Source String</b>')
- >>> letree.parse(f) #doctest:+ELLIPSIS
- <xml.etree.ElementTree.ElementTree instance at ...
-
- >>> letree.QName('http://example.namespace.org', 'test')#doctest:+ELLIPSIS
- <xml.etree.ElementTree.QName instance at...
-
- >>> print letree.tostring(elem, 'ascii')
- <?xml version='1.0' encoding='ascii'?>
- <testtag />
-
- >>> letree.TreeBuilder()
- Traceback (most recent call last):
- ...
- NotImplementedError: lxml doesn't implement TreeBuilder
-
- >>> subel = letree.SubElement(elem, 'foo')
- >>> letree.tostring(elem)
- '<testtag><foo /></testtag>'
-
- >>> letree.PI('sometarget') #doctest:+ELLIPSIS
- <Element <function ProcessingInstruction at ...
-
- >>> letree.ProcessingInstruction('sometarget') #doctest:+ELLIPSIS
- <Element <function ProcessingInstruction at ...
-
- >>> letree.XMLTreeBuilder()
- <xml.etree.ElementTree.XMLTreeBuilder instance at ...
-
- """
implements(IEtree)
def __init__(self):
@@ -229,77 +113,6 @@
class LxmlEtree(BaseEtree):
- """
- Support for lxml.
-
- >>> from cStringIO import StringIO
- >>> from zope.interface.verify import verifyObject
- >>> letree = LxmlEtree()
- >>> verifyObject(IEtree, letree)
- True
-
- >>> letree.Comment(u'some text')
- <Comment[some text]>
-
- >>> letree.Element(u'testtag')
- <Element...
-
- >>> letree.ElementTree()
- <etree._ElementTree...
-
- >>> letree.XML(u'<p>some text</p>')
- <Element p ...
-
- >>> letree.fromstring(u'<p>some text</p>')
- <Element p ...
-
- When we have a element whoes namespace declaration is declared in a parent
- element lxml doesn't print out the namespace declaration by default.
-
- >>> multinselemstr = '<D:prop xmlns:D="DAV:"><D:owner><H:href xmlns:H="examplens">http://example.org</H:href></D:owner></D:prop>'
- >>> multinselem = letree.fromstring(multinselemstr)
- >>> letree.tostring(multinselem[0])
- '<D:owner xmlns:D="DAV:"><H:href xmlns:H="examplens">http://example.org</H:href></D:owner>'
-
- >>> elem = letree.Element(u'testtag')
- >>> letree.iselement(elem)
- 1
-
- >>> f = StringIO('<b>Test Source String</b>')
- >>> letree.parse(f)
- <etree._ElementTree object at ...
-
- >>> letree.QName('http://example.namespace.org', 'test')
- <etree.QName object at...
-
- >>> letree.tostring(elem, 'ascii')
- '<testtag/>'
-
- >>> letree.TreeBuilder()
- Traceback (most recent call last):
- ...
- NotImplementedError: lxml doesn't implement TreeBuilder
-
- >>> subel = letree.SubElement(elem, 'foo')
- >>> subel.getparent() is elem
- True
-
- >>> letree.PI('sometarget')
- Traceback (most recent call last):
- ...
- NotImplementedError: lxml doesn't implement PI
-
- >>> letree.ProcessingInstruction('sometarget')
- Traceback (most recent call last):
- ...
- NotImplementedError: lxml doesn't implement PI
-
- >>> letree.XMLTreeBuilder()
- Traceback (most recent call last):
- ...
- NotImplementedError: lxml doesn't implement XMLTreeBuilder
-
- """
implements(IEtree)
def __init__(self):
More information about the Checkins
mailing list