Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-seaice committed Apr 16, 2024
1 parent e1296bc commit b518fbd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion esmgrids/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def cice_from_mom():
parser.add_argument("--ocean_mask", type=str, help="Input MOM ocean_mask.nc mask file")
parser.add_argument("--cice_grid", type=str, default="grid.nc", help="Output CICE grid file")
parser.add_argument("--cice_kmt", type=str, default="kmt.nc", help="Output CICE kmt file")

args = parser.parse_args()
ocean_hgrid = os.path.abspath(args.ocean_hgrid)
ocean_mask = os.path.abspath(args.ocean_mask)
Expand Down
12 changes: 10 additions & 2 deletions test/test_cice_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,19 @@ def test_inputs_logged(cice_grid, mom_grid):
for ds in [cice_grid.ds, cice_grid.kmt_ds]:
assert (
ds.inputfile
== (mom_grid.path + " (md5 hash: " + input_md5 + "), " + mom_grid.mask_path + " (md5 hash: " + mask_md5 + ")"),
== (
mom_grid.path
+ " (md5 hash: "
+ input_md5
+ "), "
+ mom_grid.mask_path
+ " (md5 hash: "
+ mask_md5
+ ")"
),
"inputfile attribute incorrect ({ds.inputfile} != {mom_grid.path})",
)

assert hasattr(ds, "inputfile"), "inputfile attribute missing"

assert hasattr(ds, "history"), "history attribute missing"

0 comments on commit b518fbd

Please sign in to comment.