aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_apis.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2010-10-31 18:55:30 -0400
committerWaylan Limberg <waylan@gmail.com>2010-10-31 18:55:30 -0400
commit8fb1252aec84bf0de77de4df442f260c5a4d2f98 (patch)
tree869b448b64561f33d4e662dd91b9eb9cd6fc0cf0 /tests/test_apis.py
parentca6a0e7d735746ca947f99f590b19ad1121b9800 (diff)
downloadmarkdown-8fb1252aec84bf0de77de4df442f260c5a4d2f98.tar.gz
markdown-8fb1252aec84bf0de77de4df442f260c5a4d2f98.tar.bz2
markdown-8fb1252aec84bf0de77de4df442f260c5a4d2f98.zip
Fixed previous two commits. cElementTree cannot use ElementTree nodes in the tree, but it still uses ElementTree Comment assinged to a node's tag to test for Comment nodes. Also no longer considering Commet nodes to be block level.
Diffstat (limited to 'tests/test_apis.py')
-rw-r--r--tests/test_apis.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_apis.py b/tests/test_apis.py
index 114b09d..0de4727 100644
--- a/tests/test_apis.py
+++ b/tests/test_apis.py
@@ -301,14 +301,18 @@ class testETreeComments(unittest.TestCase):
def setUp(self):
# Create comment node
self.comment = markdown.util.etree.Comment('foo')
+ if hasattr(markdown.util.etree, 'test_comment'):
+ self.test_comment = markdown.util.etree.test_comment
+ else:
+ self.test_comment = markdown.util.etree.Comment
def testCommentIsComment(self):
""" Test that an ElementTree Comment passes the `is Comment` test. """
- self.assert_(self.comment.tag is markdown.util.etree.Comment)
+ self.assert_(self.comment.tag is markdown.util.etree.test_comment)
def testCommentIsBlockLevel(self):
""" Test that an ElementTree Comment is recognized as BlockLevel. """
- self.assert_(markdown.util.isBlockLevel(self.comment.tag))
+ self.assertFalse(markdown.util.isBlockLevel(self.comment.tag))
def testCommentSerialization(self):
""" Test that an ElementTree Comment serializes properly. """