Skip to content

Commit

Permalink
Fix unit tests. Unsafe defaults were being used
Browse files Browse the repository at this point in the history
  • Loading branch information
jgfouca committed Jul 15, 2016
1 parent d4c503b commit fb3aeea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions utils/python/CIME/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ def get_cime_config():

return _CIMECONFIG

def reset_cime_config():
"""
Useful to keep unit tests from interfering with each other
"""
global _CIMECONFIG
_CIMECONFIG = None

def get_python_libs_location_within_cime():
"""
From within CIME, return subdirectory of python libraries
Expand Down Expand Up @@ -104,6 +111,7 @@ def get_model():
>>> set_model('rocky')
>>> get_model()
'rocky'
>>> reset_cime_config()
"""
model = os.environ.get("CIME_MODEL")
if (model is not None):
Expand Down

0 comments on commit fb3aeea

Please sign in to comment.