def test_mp_file_access(): print("test_file_mp_access") print("test_function_files") fin = 'infile' finout = 'inoutfile' fout = 'outfile' fin_d = open(fin, 'w') finout_d = open(finout, 'w') fin_d.write('IN FILE CONTENT') finout_d.write('INOUT FILE INITIAL CONTENT') fin_d.close() finout_d.close() function_files(fin, finout, fout) fout_d = compss_open(fout, 'r+') if fout_d.read() == 'OUT FILE CONTENT': print("- File access from MP: OK") else: print("- File access from MP: ERROR") fout_d.write("\n===> OUT FILE ADDED CONTENT") fout_d.close() function_files(fout, finout, fin)
def test_function_files(): print("test_function_files") fin = 'infile' finout = 'inoutfile' fout = 'outfile' fin_d = open(fin, 'w') finout_d = open(finout, 'w') fin_d.write('IN FILE CONTENT') finout_d.write('INOUT FILE INITIAL CONTENT') fin_d.close() finout_d.close() function_files(fin, finout, fout)