Skip to content

Commit

Permalink
Correct test_parse_access_ncfile --> test_parse_ncfile
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-white committed Jan 9, 2025
1 parent 2d18e20 commit 6d2e272
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
58 changes: 29 additions & 29 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def pytest_addoption(parser):
def _get_xfail():
"""
Get the XFAILS environment variable. We use a default of 1, indicating we expect
to add xfail marker to `test_parse_access_ncfile[AccessOm2Builder-access-om2/output000/ocean/ocean_grid.nc-expected0-True]`
to add xfail marker to `test_parse_ncfile[AccessOm2Builder-access-om2/output000/ocean/ocean_grid.nc-expected0-True]`
unless specified.
"""
xfails_default = 1
Expand All @@ -78,7 +78,7 @@ def pytest_collection_modifyitems(config, items):
"""
This function is called by pytest to modify the items collected during test
collection. We use it here to mark the xfail tests in
test_builders::test_parse_access_ncfile when we check the file contents & to
test_builders::test_parse_ncfile when we check the file contents & to
ensure we correctly get xfails if we don't have cordinate discovery enabled
in intake-esm.
Expand All @@ -89,33 +89,33 @@ def pytest_collection_modifyitems(config, items):
if (
item.name
in (
"test_parse_access_ncfile[AccessOm2Builder-access-om2/output000/ocean/ocean_grid.nc-expected0-True]",
# "test_parse_access_ncfile[AccessOm2Builder-access-om2/output000/ocean/ocean.nc-expected1-True]",
# "test_parse_access_ncfile[AccessOm2Builder-access-om2/output000/ocean/ocean_month.nc-expected2-True]",
# "test_parse_access_ncfile[AccessOm2Builder-access-om2/output000/ocean/ocean_month_inst_nobounds.nc-expected3-True]",
# "test_parse_access_ncfile[AccessOm2Builder-access-om2/output000/ice/OUTPUT/iceh.1900-01.nc-expected4-True]",
# "test_parse_access_ncfile[AccessCm2Builder-access-cm2/by578/history/atm/netCDF/by578a.pd201501_dai.nc-expected5-True]",
# "test_parse_access_ncfile[AccessCm2Builder-access-cm2/by578/history/ice/iceh_d.2015-01.nc-expected6-True]",
# "test_parse_access_ncfile[AccessCm2Builder-access-cm2/by578/history/ocn/ocean_daily.nc-20150630-expected7-True]",
# "test_parse_access_ncfile[AccessCm2Builder-access-cm2/by578/history/ocn/ocean_scalar.nc-20150630-expected8-True]",
# "test_parse_access_ncfile[AccessEsm15Builder-access-esm1-5/history/atm/netCDF/HI-C-05-r1.pa-185001_mon.nc-expected9-True]",
# "test_parse_access_ncfile[AccessEsm15Builder-access-esm1-5/history/ice/iceh.1850-01.nc-expected10-True]",
# "test_parse_access_ncfile[AccessEsm15Builder-access-esm1-5/history/ocn/ocean_bgc_ann.nc-18501231-expected11-True]",
# "test_parse_access_ncfile[AccessEsm15Builder-access-esm1-5/history/ocn/ocean_bgc.nc-18501231-expected12-True]",
# "test_parse_access_ncfile[AccessOm3Builder-access-om3/output000/GMOM_JRA_WD.mom6.h.native_1900_01.nc-expected13-True]",
# "test_parse_access_ncfile[AccessOm3Builder-access-om3/output000/GMOM_JRA_WD.mom6.h.sfc_1900_01_02.nc-expected14-True]",
# "test_parse_access_ncfile[AccessOm3Builder-access-om3/output000/GMOM_JRA_WD.mom6.h.static.nc-expected15-True]",
# "test_parse_access_ncfile[AccessOm3Builder-access-om3/output000/GMOM_JRA_WD.mom6.h.z_1900_01.nc-expected16-True]",
# "test_parse_access_ncfile[AccessOm3Builder-access-om3/output000/GMOM_JRA_WD.cice.h.1900-01-01.nc-expected17-True]",
# "test_parse_access_ncfile[AccessOm3Builder-access-om3/output000/GMOM_JRA_WD.ww3.hi.1900-01-02-00000.nc-expected18-True]",
"test_parse_access_ncfile[Mom6Builder-mom6/output000/19000101.ice_daily.nc-expected19-True]",
"test_parse_access_ncfile[Mom6Builder-mom6/output000/19000101.ocean_annual_z.nc-expected20-True]",
"test_parse_access_ncfile[Mom6Builder-mom6/output000/19000101.ocean_month_rho2.nc-expected21-True]",
# "test_parse_access_ncfile[Mom6Builder-mom6/output000/19000101.ocean_scalar_annual.nc-expected22-True]",
"test_parse_access_ncfile[Mom6Builder-mom6/output000/19000101.ocean_static.nc-expected23-True]",
# "test_parse_access_ncfile[Mom6Builder-mom6/output053/20051101.ocean_daily_2005_360.nc-expected24-True]",
"test_parse_access_ncfile[Mom6Builder-mom6/output053/20051101.ocean_daily_rho2_2005_360.nc-expected25-True]",
"test_parse_access_ncfile[Mom6Builder-mom6/output053/20051101.ocean_daily_z_2005_360.nc-expected26-True]",
"test_parse_ncfile[AccessOm2Builder-access-om2/output000/ocean/ocean_grid.nc-expected0-True]",
# "test_parse_ncfile[AccessOm2Builder-access-om2/output000/ocean/ocean.nc-expected1-True]",
# "test_parse_ncfile[AccessOm2Builder-access-om2/output000/ocean/ocean_month.nc-expected2-True]",
# "test_parse_ncfile[AccessOm2Builder-access-om2/output000/ocean/ocean_month_inst_nobounds.nc-expected3-True]",
# "test_parse_ncfile[AccessOm2Builder-access-om2/output000/ice/OUTPUT/iceh.1900-01.nc-expected4-True]",
# "test_parse_ncfile[AccessCm2Builder-access-cm2/by578/history/atm/netCDF/by578a.pd201501_dai.nc-expected5-True]",
# "test_parse_ncfile[AccessCm2Builder-access-cm2/by578/history/ice/iceh_d.2015-01.nc-expected6-True]",
# "test_parse_ncfile[AccessCm2Builder-access-cm2/by578/history/ocn/ocean_daily.nc-20150630-expected7-True]",
# "test_parse_ncfile[AccessCm2Builder-access-cm2/by578/history/ocn/ocean_scalar.nc-20150630-expected8-True]",
# "test_parse_ncfile[AccessEsm15Builder-access-esm1-5/history/atm/netCDF/HI-C-05-r1.pa-185001_mon.nc-expected9-True]",
# "test_parse_ncfile[AccessEsm15Builder-access-esm1-5/history/ice/iceh.1850-01.nc-expected10-True]",
# "test_parse_ncfile[AccessEsm15Builder-access-esm1-5/history/ocn/ocean_bgc_ann.nc-18501231-expected11-True]",
# "test_parse_ncfile[AccessEsm15Builder-access-esm1-5/history/ocn/ocean_bgc.nc-18501231-expected12-True]",
# "test_parse_ncfile[AccessOm3Builder-access-om3/output000/GMOM_JRA_WD.mom6.h.native_1900_01.nc-expected13-True]",
# "test_parse_ncfile[AccessOm3Builder-access-om3/output000/GMOM_JRA_WD.mom6.h.sfc_1900_01_02.nc-expected14-True]",
# "test_parse_ncfile[AccessOm3Builder-access-om3/output000/GMOM_JRA_WD.mom6.h.static.nc-expected15-True]",
# "test_parse_ncfile[AccessOm3Builder-access-om3/output000/GMOM_JRA_WD.mom6.h.z_1900_01.nc-expected16-True]",
# "test_parse_ncfile[AccessOm3Builder-access-om3/output000/GMOM_JRA_WD.cice.h.1900-01-01.nc-expected17-True]",
# "test_parse_ncfile[AccessOm3Builder-access-om3/output000/GMOM_JRA_WD.ww3.hi.1900-01-02-00000.nc-expected18-True]",
"test_parse_ncfile[Mom6Builder-mom6/output000/19000101.ice_daily.nc-expected19-True]",
"test_parse_ncfile[Mom6Builder-mom6/output000/19000101.ocean_annual_z.nc-expected20-True]",
"test_parse_ncfile[Mom6Builder-mom6/output000/19000101.ocean_month_rho2.nc-expected21-True]",
# "test_parse_ncfile[Mom6Builder-mom6/output000/19000101.ocean_scalar_annual.nc-expected22-True]",
"test_parse_ncfile[Mom6Builder-mom6/output000/19000101.ocean_static.nc-expected23-True]",
# "test_parse_ncfile[Mom6Builder-mom6/output053/20051101.ocean_daily_2005_360.nc-expected24-True]",
"test_parse_ncfile[Mom6Builder-mom6/output053/20051101.ocean_daily_rho2_2005_360.nc-expected25-True]",
"test_parse_ncfile[Mom6Builder-mom6/output053/20051101.ocean_daily_z_2005_360.nc-expected26-True]",
)
and _add_xfail
):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -2587,7 +2587,7 @@ def test_parse_filename(builder, filename, expected):
),
],
)
def test_parse_access_ncfile(test_data, builder, filename, expected, compare_files):
def test_parse_ncfile(test_data, builder, filename, expected, compare_files):
"""
Tests for correctness of parser. Note that if we are using intake-esm without
coordinate discovery enabled, the `conftest.py` fixture will dynamically set
Expand Down

0 comments on commit 6d2e272

Please sign in to comment.