def test_Equal(): checkfail(ChildrenOf(Table, Equal(Row, Row))) checkpass(ChildrenOf(Article, Equal(Section, Table, Section, Text)))
def test_Require(): checkfail(ChildrenOf(PreFormatted, Require(Section))) checkpass(ChildrenOf(PreFormatted, Require(Text)))
def test_Forbid(): checkfail(ChildrenOf(Section, Forbid(Section))) checkpass(ChildrenOf(Table, Forbid(Section)))
def test_Allow(): checkfail(ChildrenOf(Table, Allow(Row))) checkpass(ChildrenOf(Article, Allow(Section, Text, Table)))