def test_write_file3(self): """Function: test_write_file3 Description: Test with writing to file. Arguments: """ gen_libs.print_list(self.data, ofile=self.file) self.assertTrue(filecmp.cmp(self.file, self.res_file))
def test_write_file2(self): """Function: test_write_file2 Description: Test with writing to file. Arguments: """ gen_libs.print_list(self.data, ofile=self.file) self.assertEqual(linecnt(self.file), 1)
def test_mode_a_empty5(self): """Function: test_mode_a_empty5 Description: Test with file mode of append passing mode. Arguments: """ gen_libs.print_list(self.data3, ofile=self.file, mode=self.mode) self.assertEqual(linecnt(self.file), 0)
def test_write_file(self): """Function: test_write_file Description: Test with writing to file. Arguments: """ gen_libs.print_list(self.data, ofile=self.file) self.assertTrue(os.path.isfile(self.file))
def test_mode_a_empty6(self): """Function: test_mode_a_empty6 Description: Test with file mode of append passing mode. Arguments: """ gen_libs.print_list(self.data3, ofile=self.file, mode=self.mode) self.assertTrue(filecmp.cmp(self.file, self.res_file4))
def test_mode_w_default(self): """Function: test_mode_w_default Description: Test with file mode of overwrite using default setting. Arguments: """ gen_libs.print_list(self.data2, ofile=self.file) gen_libs.print_list(self.data2, ofile=self.file) self.assertTrue(os.path.isfile(self.file))
def test_mode_w_default2(self): """Function: test_mode_w_default2 Description: Test with file mode of overwrite using default setting. Arguments: """ gen_libs.print_list(self.data2, ofile=self.file) gen_libs.print_list(self.data2, ofile=self.file) self.assertEqual(linecnt(self.file), 2)
def test_mode_w_default3(self): """Function: test_mode_w_default3 Description: Test with file mode of overwrite using default setting. Arguments: """ gen_libs.print_list(self.data2, ofile=self.file) gen_libs.print_list(self.data2, ofile=self.file) self.assertTrue(filecmp.cmp(self.file, self.res_file2))
def test_mode_w_passed2(self): """Function: test_mode_w_passed2 Description: Test with file mode of overwrite passing mode. Arguments: """ gen_libs.print_list(self.data, ofile=self.file, mode=self.mode2) gen_libs.print_list(self.data, ofile=self.file, mode=self.mode2) self.assertEqual(linecnt(self.file), 1)
def test_mode_w_passed3(self): """Function: test_mode_w_passed3 Description: Test with file mode of overwrite passing mode. Arguments: """ gen_libs.print_list(self.data, ofile=self.file, mode=self.mode2) gen_libs.print_list(self.data, ofile=self.file, mode=self.mode2) self.assertTrue(filecmp.cmp(self.file, self.res_file))
def test_mode_a_passed(self): """Function: test_mode_a_passed Description: Test with file mode of append passing mode. Arguments: """ gen_libs.print_list(self.data2, ofile=self.file, mode=self.mode) gen_libs.print_list(self.data2, ofile=self.file, mode=self.mode) self.assertTrue(os.path.isfile(self.file))
def test_mode_w_empty(self): """Function: test_mode_w_empty Description: Test with write mode with empty list. Arguments: """ gen_libs.print_list(self.data2, ofile=self.file, mode=self.mode2) gen_libs.print_list(self.data3, ofile=self.file, mode=self.mode2) self.assertTrue(os.path.isfile(self.file))
def test_mode_w_empty2(self): """Function: test_mode_w_empty2 Description: Test with write mode with empty list. Arguments: """ gen_libs.print_list(self.data2, ofile=self.file, mode=self.mode2) gen_libs.print_list(self.data3, ofile=self.file, mode=self.mode2) self.assertEqual(linecnt(self.file), 0)
def test_mode_w_empty3(self): """Function: test_mode_w_empty3 Description: Test with write mode with empty list. Arguments: """ gen_libs.print_list(self.data2, ofile=self.file, mode=self.mode2) gen_libs.print_list(self.data3, ofile=self.file, mode=self.mode2) self.assertTrue(filecmp.cmp(self.file, self.res_file4))
def test_mode_a_empty4(self): """Function: test_mode_a_empty4 Description: Test with append mode with empty list. Arguments: """ gen_libs.print_list(self.data2, ofile=self.file, mode=self.mode) gen_libs.print_list(self.data3, ofile=self.file, mode=self.mode) self.assertTrue(os.path.isfile(self.file))
def test_mode_w_passed(self): """Function: test_mode_w_passed Description: Test with file mode of overwrite passing mode. Arguments: """ gen_libs.print_list(self.data, ofile=self.file, mode=self.mode2) gen_libs.print_list(self.data, ofile=self.file, mode=self.mode2) self.assertTrue(os.path.isfile(self.file))
def test_std_out3(self): """Function: test_std_out3 Description: Test with empty list. Arguments: """ self.assertFalse(gen_libs.print_list(self.data3))
def test_std_out(self): """Function: test_std_out Description: Test with printing to standard out. Arguments: """ with gen_libs.no_std_out(): self.assertFalse(gen_libs.print_list(self.data))