Skip to content

Commit

Permalink
file path was not properly displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed May 22, 2024
1 parent f4e27e5 commit 9308d4d
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 9308d4d

Please sign in to comment.