예제 #1
0
 def test_comment_is_preserved_when_shifting_row_to_left_and_back(self):
     test = self.project.datafiles[1].tests[15]
     test.execute(DeleteCell(2,0))
     self.assertEqual(test.steps[2].as_list(), ['Keyword', '# comment'])
     test.execute(InsertCell(2,0))
     self.assertEqual(test.steps[2].as_list(), ['', 'Keyword', '# comment'])
     test.execute(DeleteCell(1,0))
     self.assertEqual(test.steps[1].as_list(), ['Kw1', '# comment'])
     test.execute(InsertCell(1,0))
     self.assertEqual(test.steps[1].as_list(), ['', 'Kw1', '# comment'])
예제 #2
0
 def test_modify_step_so_that_it_becomes_part_of_for_loop_at_last_position(self):
     test = self.project.datafiles[1].tests[4]
     # for index, step in enumerate(test.steps):
     #     print("DEBUG: test steps: %d %s" % (index, step.as_list()))
     # self._steps_are_not_in_for_loop(test, 3)
     test.execute(InsertCell(3, 0))
     # for index, step in enumerate(test.steps):
     #    print("DEBUG: test steps: %d %s" % (index, step.as_list()))
     self._steps_are_in_for_loop(test, 1, 2, 3)
예제 #3
0
 def test_modify_step_so_that_it_becomes_part_of_for_loop_at_middle_position(self):
     test = self.project.datafiles[1].tests[2]
     test.execute(InsertCell(2, 0))
     self._steps_are_in_for_loop(test, 1, 2, 3)
예제 #4
0
 def add_cell(self):
     self._macro_execute(InsertCell(self._rand_row(), self._rand_col()))