CIME.SystemTests.test_utils package

Submodules

CIME.SystemTests.test_utils.user_nl_utils module

This module contains functions for working with user_nl files in system tests.

CIME.SystemTests.test_utils.user_nl_utils.append_to_user_nl_files(caseroot, component, contents)[source]

Append the string given by ‘contents’ to the end of each user_nl file for the given component (there may be multiple such user_nl files in the case of a multi-instance test).

Also puts new lines before and after the appended text - so ‘contents’ does not need to contain a trailing new line (but it’s also okay if it does).

Args:

caseroot (str): Full path to the case directory

component (str): Name of component (e.g., ‘clm’). This is used to

determine which user_nl files are appended to. For example, for component=’clm’, this function will operate on all user_nl files matching the pattern ‘user_nl_clm*’. (We do a wildcard match to handle multi-instance tests.)

contents (str): Contents to append to the end of each user_nl file

Module contents