def it_is_structured_text(self): section = Section(".text") section.global_("_start") section.new_function("_start") section.new_function("write") str(section) |should| equal_to("section .text\n\tglobal\t_start\n_start:\n\n\tret\nwrite:\n\n\tret")
def it_has_functions(self): section = Section(".text") function = section.new_function("_start") section |should| have(1).functions section.functions |should| include(function)