示例#1
0
def test_empty_doc():
    doc = Doc()
    assert doc.getvalue() == ""
    assert str(doc) == ""

    doc.text("thing")
    assert doc.getvalue() == "thing"
    assert str(doc) == "thing"
示例#2
0
文件: _yawrap.py 项目: kamichal/yarap
 def _render_page(self):
     page_doc = Doc()
     with self._html_page_structure(page_doc):
         page_doc._clone_children(self)
     return page_doc.getvalue()