#! /usr/bin/env/python # -*- coding: iso-8859-1 -*- ## Copyright 1999-2006 by LivingLogic AG, Bayreuth/Germany. ## Copyright 1999-2006 by Walter Dörwald ## ## All Rights Reserved ## ## See xist/__init__.py for the license from ll.xist import xsc from ll.xist.ns import html, php def test_pretty(): def check(node, result): assert node.pretty().asBytes() == result tests = [ (html.p("apple", "tree"), "
appletree
"), (html.p("apple", html.br(), "tree"), "apple
tree
\n\t\n
"), (html.p(php.php("apple"), "tree"), "tree
"), ( html.div(2*html.p("apple", "tree"), html.br()), "appletree
\n\tappletree
\n\tappletree
\n\tapple
\n\t\ttree
\n\t