Beispiel #1
0
def test_block():
    block = Block(null, true)
    assert block.nodes == []
    assert block.scope is True
    assert block.node == true
    assert block.parent == null
    assert block.node_name == "block"
    assert block.is_empty() is True
Beispiel #2
0
def test_block_append():
    block = Block(
        Comment("comment", False, False),
        Block(String("hello"), String("There!")),
    )
    block.append(Literal("Literal"))
    block.append(true)
    assert block.nodes == [Literal("Literal"), true]
    assert block.has_properties() is False
    assert block.has_media() is False
    assert block.is_empty() is False