Example #1
0
 def visit_Keyword(self, node):
     if not node.body.items or node != self.keywords[-1]:
         node.body.items.append(EmptyLine.from_value(self.newline))
     self.generic_visit(node)
     return node
Example #2
0
 def visit_TestCase(self, node):
     if not node.body.items or node != self.tests[-1]:
         node.body.items.append(EmptyLine.from_value(self.newline))
     self.generic_visit(node)
     return node
Example #3
0
 def visit_Section(self, node):
     if node != self.sections[-1]:
         node.body.add(EmptyLine.from_value(self.newline))
     self.generic_visit(node)
     return node
Example #4
0
 def visit_Keyword(self, node):
     if not node.body or node is not self.last_keyword:
         node.body.append(EmptyLine.from_value(self.newline))
     return self.generic_visit(node)
Example #5
0
 def visit_TestCase(self, node):
     if not node.body or node is not self.last_test:
         node.body.append(EmptyLine.from_value(self.newline))
     return self.generic_visit(node)
Example #6
0
 def visit_Section(self, node):
     if node is not self.last_section:
         node.body.append(EmptyLine.from_value(self.newline))
     return self.generic_visit(node)