def test_remove_multiple_lines(self):
     generate_test_file(TEST_FILE)
     file_utils.remove_line_in_file(TEST_FILE, 1)
     self.assert_result(TEST_FILE, ['0', 'II', 'III', 'IV', 'V'])
     file_utils.remove_line_in_file(TEST_FILE, 2)
     self.assert_result(TEST_FILE, ['0', 'II', 'IV', 'V'])
示例#2
0
 def test_remove_multiple_lines(self):
     generate_test_file(TEST_FILE)
     file_utils.remove_line_in_file(TEST_FILE, 1)
     self.assert_result(TEST_FILE, ['0', 'II', 'III', 'IV', 'V'])
     file_utils.remove_line_in_file(TEST_FILE, 2)
     self.assert_result(TEST_FILE, ['0', 'II', 'IV', 'V'])
 def test_remove_last_line(self):
     generate_test_file(TEST_FILE)
     file_utils.remove_line_in_file(TEST_FILE, 5)
     self.assert_result(TEST_FILE, ['0', 'I', 'II', 'III', 'IV'])
示例#4
0
 def test_remove_last_line(self):
     generate_test_file(TEST_FILE)
     file_utils.remove_line_in_file(TEST_FILE, 5)
     self.assert_result(TEST_FILE, ['0', 'I', 'II', 'III', 'IV'])