Skip to content

Commit

Permalink
Merge pull request #1075 from ocefpaf/fix_filepath_bug
Browse files Browse the repository at this point in the history
Fix filepath bug
  • Loading branch information
ocefpaf authored May 22, 2024
2 parents f4e27e5 + 9308d4d commit 3e79d4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compliance_checker/cf/cf_1_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ def __init__(self, options=None): # initialize with parent methods and data
def check_filename(self, ds):
"""Checks that the filename ends with .nc"""
# IMPLEMENTS CONFORMANCE 2.1
filepath = ds.filepath()
filename_suffix = TestCtx(BaseCheck.HIGH, self.section_titles["2.1"])
filename_suffix.assert_true(
ds.filepath().endswith("nc"),
f'Dataset path {ds.filepath} must end with ".nc"',
filepath.endswith("nc"),
f'Dataset path {filepath} must end with ".nc"',
)
return filename_suffix.to_result()

Expand Down

0 comments on commit 3e79d4b

Please sign in to comment.