From 1cc1fa1435e9d97b911b5ffdb72fc33d45d81f38 Mon Sep 17 00:00:00 2001 From: Yang Date: Thu, 6 Jul 2023 15:42:38 +0200 Subject: [PATCH] make linter happy --- tests/test_regrid.py | 7 +++---- tests/test_xesmf_regrid.py | 9 +++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/test_regrid.py b/tests/test_regrid.py index 99b5797..69c65b2 100644 --- a/tests/test_regrid.py +++ b/tests/test_regrid.py @@ -1,6 +1,5 @@ """Unit test for regridding.""" -import builtins from pathlib import Path import numpy as np import pytest @@ -10,14 +9,14 @@ path_dummy_data = Path(__file__).resolve().parent / "test_data" / "eth-canopy-height" - +XESMF_INSTALLED = True try: import xesmf as _ # noqa: F401 (unused import) except ImportError: - xesmf_installed = False + XESMF_INSTALLED = False -@pytest.mark.skipif(xesmf_installed, reason="xesmf is installed") +@pytest.mark.skipif(XESMF_INSTALLED, reason="xesmf is installed") def assert_xesmf_available() -> None: """Test assert_xesmf_available function with exception case.""" with pytest.raises(ImportError, match="Could not import the `xesmf`"): diff --git a/tests/test_xesmf_regrid.py b/tests/test_xesmf_regrid.py index bb30846..17ceb83 100644 --- a/tests/test_xesmf_regrid.py +++ b/tests/test_xesmf_regrid.py @@ -3,17 +3,18 @@ import pytest +XESMF_INSTALLED = True try: import xesmf as _ # noqa: F401 (unused import) except ImportError: - xesmf_installed = False + XESMF_INSTALLED = False -@pytest.mark.skipif(not xesmf_installed, reason="xesmf is not installed") +@pytest.mark.skipif(not XESMF_INSTALLED, reason="xesmf is not installed") def test_create_new_grid(): pass -@pytest.mark.skipif(not xesmf_installed, reason="xesmf is not installed") +@pytest.mark.skipif(not XESMF_INSTALLED, reason="xesmf is not installed") def test_xesfm_regrid(): - pass \ No newline at end of file + pass