Skip to content

Commit

Permalink
make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang committed Jul 6, 2023
1 parent 061ee5b commit 1cc1fa1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
7 changes: 3 additions & 4 deletions tests/test_regrid.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Unit test for regridding."""

import builtins
from pathlib import Path
import numpy as np
import pytest
Expand All @@ -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`"):
Expand Down
9 changes: 5 additions & 4 deletions tests/test_xesmf_regrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
pass

0 comments on commit 1cc1fa1

Please sign in to comment.