Skip to content

Commit

Permalink
Merge pull request #4484 from ESMCI/fix_hist_utils
Browse files Browse the repository at this point in the history

Removes .* between hist_file_extension and suffix in get_all_hist_files.
This would cause ERIO test to fail by not finding the correct files to compare
due to the extra text allowed between the extension and suffix. If there is
expected text between the extension and suffix this should be defined in
hist_file_extension.

Test suite: pytest -vvv
Test baseline: n/a
Test namelist changes: n/a
Test status: n/a

Fixes n/a
User interface changes?: n/a
Update gh-pages html (Y/N)?: N
  • Loading branch information
jasonb5 authored Sep 12, 2023
2 parents e034e29 + 056a50e commit 89b20e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CIME/XML/archive_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def get_all_hist_files(self, casename, model, from_dir, suffix="", ref_case=None
string = model + r"\d?_?(\d{4})?\." + ext
if has_suffix:
if not suffix in string:
string += r".*\." + suffix + "$"
string += r"\." + suffix + "$"

if not string.endswith("$"):
string += "$"
Expand Down
2 changes: 1 addition & 1 deletion CIME/tests/test_unit_xml_archive_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

TEST_CONFIG = """<components version="2.0">
<comp_archive_spec compname="eam" compclass="atm">
<hist_file_extension>unique\.name\.unique</hist_file_extension>
<hist_file_extension>unique\.name\.unique.*</hist_file_extension>
</comp_archive_spec>
</components>"""

Expand Down

0 comments on commit 89b20e1

Please sign in to comment.