瀏覽代碼

test_heading() and test_comment()

tags/v0.2
Ben Kurtovic 11 年之前
父節點
當前提交
132c6584d0
共有 1 個檔案被更改,包括 22 行新增2 行删除
  1. +22
    -2
      tests/test_builder.py

+ 22
- 2
tests/test_builder.py 查看文件

@@ -173,11 +173,31 @@ class TestBuilder(TreeEqualityTestCase):

def test_heading(self):
"""tests for building Heading nodes"""
pass
tests = [
([tokens.HeadingStart(level=2), tokens.Text(text="foobar"),
tokens.HeadingEnd()],
wrap([Heading(wrap([Text("foobar")]), 2)])),

([tokens.HeadingStart(level=4), tokens.Text(text="spam"),
tokens.Text(text="eggs"), tokens.HeadingEnd()],
wrap([Heading(wrap([Text("spam"), Text("eggs")]), 4)])),
]
for test, valid in tests:
self.assertWikicodeEqual(valid, self.builder.build(test))

def test_comment(self):
"""tests for building Comment nodes"""
pass
tests = [
([tokens.CommentStart(), tokens.Text(text="foobar"),
tokens.CommentEnd()],
wrap([Comment(wrap([Text("foobar")]))])),

([tokens.CommentStart(), tokens.Text(text="spam"),
tokens.Text(text="eggs"), tokens.CommentEnd()],
wrap([Comment(wrap([Text("spam"), Text("eggs")]))])),
]
for test, valid in tests:
self.assertWikicodeEqual(valid, self.builder.build(test))

@unittest.skip("holding this until feature/html_tags is ready")
def test_tag(self):


Loading…
取消
儲存