def test_default(): """xml.writer.default.nw """ doc, _ = lexor.parse(DOCUMENT, 'xml') doc.style = 'default' compare_with(str(doc), EXPECTED) doc.defaults = {'entity': '<%s>'} compare_with(str(doc), EXPECTED_ENTITY) doc.defaults = {'tab': '****'} compare_with(str(doc), EXPECTED_TAB)
def test_min(): """xml.writer.min.nw """ doc, _ = lexor.parse(DOCUMENT, 'xml') doc.style = 'min' compare_with(str(doc), EXPECTED) doc.defaults = {'comment': 'Copyright:'} compare_with(str(doc), EXPECTED_CR) doc.defaults['comment'] = 'ML:|JS:' compare_with(str(doc), EXPECTED_USER)
def test_default(): """lexor.writer.default.header """ doc, _ = lexor.parse(DOCUMENT, 'html') doc.lang = 'lexor' doc.style = 'default' compare_with(str(doc), EXPECTED) doc.defaults = { 'header': 'hash', 'hashheader': 'open', } compare_with(str(doc), EXPECTED_OPEN)
def test_default(): """lexor.writer.default.inline """ doc, _ = lexor.parse(DOCUMENT, 'html') doc.style = 'default'
def test_default(): """lexor.writer.default.list """ doc, _ = lexor.parse(DOCUMENT, 'html') doc.lang = 'lexor' doc.style = 'default' compare_with(str(doc), EXPECTED)
def test_default(): """html.writer.default.nw """ doc, _ = lexor.parse(DOCUMENT, 'html') doc.style = 'default' compare_with(str(doc), EXPECTED)
def test_plain(): """html.writer.plain.nw """ doc, _ = lexor.parse(DOCUMENT, 'html') doc.style = 'plain' compare_with(str(doc), EXPECTED)
def test_min(): """html.writer.min.nw """ doc, _ = lexor.parse(DOCUMENT, 'html') doc.style = 'min' doc.defaults = {'comment': 'Copyright:'} compare_with(str(doc), EXPECTED)
def test_plain(): """xml.writer.plain.nw """ doc, _ = lexor.parse(DOCUMENT, "xml") doc.style = "plain" compare_with(str(doc), EXPECTED)
def test_min(): """html.writer.min.nw """ doc, _ = lexor.parse(DOCUMENT, "html") doc.style = "min" doc.defaults = {"comment": "Copyright:"} compare_with(str(doc), EXPECTED)