コード例 #1
0
 def test_file_io_operations_open_file_object_write_results():
     prompt = "	Test: file_io_BLAH.open_file_object_write_results()	{}"
     statistical_analysis.increment_number_test_cases_used()
     results_f_obj = file_io_operations.open_file_object_write_results()
     if results_f_obj:
         print(prompt.format("OK"))
         statistical_analysis.increment_number_test_cases_passed()
     else:
         print(prompt.format("FAIL!!!"))
     file_io_operations.close_file_object(results_f_obj)
コード例 #2
0
    def test_writing_to_results_file():
        """
			Temporarily redirect standard output and standard error
				to an output file.
		"""
        results_file_object = file_io_operations.open_file_object_write_results(
        )
        file_io_operations.redirect_std_op_to_file_obj(results_file_object)
        file_io_operations.redirect_std_err_to_file_obj(results_file_object)
        # Write test message in the experimental/simulation results file.
        test_message = "Storing experimental/simulation results."
        print(test_message)
        # Close the file object for reading.
        file_io_operations.close_file_object(results_file_object)
        # Stop redirecting standard output and standard to an output file.
        file_io_operations.stop_redirecting_std_op()
        file_io_operations.stop_redirecting_std_err()
        return True
コード例 #3
0

###############################################################
# Main method for the program.

#	If this is executed as a Python script,
if __name__ == "__main__":
    """
		Print results of automated regresstion testing to
			output file.
	
		File object for output file containing automated regression
			software testing results.
	"""
    regression_results_f_obj = file_io_operations.open_file_object_write_results(
        file_io_operations.regression_testing_results_location,
        file_io_operations.regression_testing_results_suffix)
    #regression_results_f_obj = file_io_operations.open_file_object_write_results(file_io_operations.regression_testing_results_location, file_io_operations.regression_testing_results_suffix)
    """
	# Redirect standard output and standard error to an output file.
	results_file_object = file_io_operations.open_file_object_write_results()
	file_io_operations.redirect_std_op_to_file_obj(results_file_object)
	file_io_operations.redirect_std_err_to_file_obj(results_file_object)
	"""
    regression_results_f_obj.write(
        "==================================================")
    regression_results_f_obj.write(
        "Automating incremental regression testing of my software")
    regression_results_f_obj.write("	solution for genetic technology mapping.")
    regression_results_f_obj.write("")
    # Assign input arguments to "queue_ip_args" for processing.