def test_validate_arguments_output_folder_is_file(mockExit): rm(test_output_folder_path) open(test_output_folder_path, "a").close() validate_arguments(arguments) assert mockExit.call_count > 0 and mockExit.call_args_list[0].args[0] != 0
def test_validate_arguments_input_file_is_directory(mockExit): rm(test_input_file_name) os.mkdir(test_input_file_name) validate_arguments(arguments) assert mockExit.call_count > 0 and mockExit.call_args_list[0].args[0] != 0
def test_validate_arguments_no_output_folder(mockExit): rm(test_output_folder_path) validate_arguments(arguments) assert mockExit.call_count > 0 and mockExit.call_args_list[0].args[0] != 0
def test_validate_arguments_no_input_file(mockExit): rm(test_input_file_name) validate_arguments(arguments) assert mockExit.call_count > 0 and mockExit.call_args_list[0].args[0] != 0
def test_validate_arguments_valid(): assert validate_arguments(arguments) # Everything working