You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This approach would avoid needing to individually add decorators...but, running locally would require remembering whether to run with the tag, or not...???
The text was updated successfully, but these errors were encountered:
# Try importing xesmf and set to None if not found at correct version# If set to None, the `require_module` decorator will throw an exceptionXESMF_MINIMUM_VERSION="0.6.2"try:
importxesmfasxeifparse_version(xe.__version__) <parse_version(XESMF_MINIMUM_VERSION):
raiseValueError()
exceptException:
xe=None
and in the tests
fromclisops.core.regridimportXESMF_MINIMUM_VERSION, xeXESMF_IMPORT_MSG= (
f"xESMF >= {XESMF_MINIMUM_VERSION} is needed for regridding functionalities."
)
@pytest.mark.skipif(xeisNone, reason=XESMF_IMPORT_MSG)deftest123():
[...]
Description
Could use pytest markers for dealing with tests that use xesmf. Maybe it would look like:
python -m pytest -m "not regrid" tests
python -m pytest tests
(i.e. all)This approach would avoid needing to individually add decorators...but, running locally would require remembering whether to run with the tag, or not...???
The text was updated successfully, but these errors were encountered: