def test_move_back_first_element(self): paragraph = [ 'A:\n', ' E:\n', ' C: Cc\n', ' D: Dd\n', ' B: Bb\n' ] line = Line('A:\n', paragraph) with self.assertRaises(IndexError): line.move_back()
def test_simple(self): paragraph = [ 'A:\n', ' E:\n', ' C: Cc\n', ' D: Dd\n', ' B: Bb\n' ] line = Line(' B: Bb\n', paragraph) line.move_back() self.assertEqual(paragraph, [ 'A:\n', ' E:\n', ' C: Cc\n', ' B: Bb\n', ' D: Dd\n' ])