def test_next_statement(): build = Builder() build.next_statement({ "command": "include", "file": "test.py", "section": "test section", "format": "html", "lines": [] }) assert_equal(len(build.exports), 1) assert_equal(len(build.sections), 1) build.next_statement({ "command": "export", "section": "test other section", "language": "python", "lines": []}) build.end() assert_equal(len(build.exports), 2)
def test_end(): build = Builder() build.export("Test","python") build.end() assert_equal( len(build.exports), 2, "end didn't start a new anonymous section")