def test_comment_is_preserved_when_shifting_row_to_left_and_back(self): test = self.chief.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'])
def add_cell(self): self._macro_execute(InsertCell(self._rand_row(), self._rand_col()))
def test_modify_step_so_that_it_becomes_part_of_for_loop_at_last_position( self): test = self.chief.datafiles[1].tests[4] test.execute(InsertCell(3, 0)) self._steps_are_in_for_loop(test, 1, 2, 3)
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)