From 6d2e272afa73c64921a3ea9365eeb1e4134404f0 Mon Sep 17 00:00:00 2001 From: Marc White Date: Thu, 9 Jan 2025 13:49:06 +1100 Subject: [PATCH] Correct test_parse_access_ncfile --> test_parse_ncfile --- tests/conftest.py | 58 +++++++++++++++++++++--------------------- tests/test_builders.py | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 5f2c55f..4eea9b8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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 @@ -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. @@ -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 ): diff --git a/tests/test_builders.py b/tests/test_builders.py index 176e978..6263d6c 100644 --- a/tests/test_builders.py +++ b/tests/test_builders.py @@ -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