예제 #1
0
 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'])
예제 #2
0
 def test_new_for_loop_with_existing_comment(self):
     test = self.chief.datafiles[1].tests[16]
     test.execute(ChangeCellValue(0, 2, '# comment'))
     test.execute(ChangeCellValue(0, 0, ':FOR'))
     self.assertEqual(test.steps[0].as_list(), [':FOR', '', '# comment'])
     test.execute(DeleteCell(0, 0))
     self.assertEqual(test.steps[0].as_list(), ['', '# comment'])
예제 #3
0
 def remove_cell(self):
     self._macro_execute(DeleteCell(self._rand_row(), self._rand_col()))
예제 #4
0
 def test_for_loop_shift_left(self):
     test = self.chief.datafiles[1].tests[12]
     test.execute(ChangeCellValue(0, 0, ': FOR'))
     test.execute(DeleteCell(0, 0))
     self.assertEqual(type(test.steps[0]), StepController)