Skip to content

Commit

Permalink
Adjust test to find xclim location via importlib
Browse files Browse the repository at this point in the history
Signed-off-by: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com>
  • Loading branch information
Zeitsperre committed Dec 18, 2024
1 parent 7af92dd commit 6c811fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_modules.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

from importlib.util import find_spec
from inspect import _empty # noqa
from pathlib import Path

Expand Down Expand Up @@ -264,7 +265,7 @@ def test_validate(tmp_path):


class TestOfficialYaml(yamale.YamaleTestCase):
base_dir = str(Path(__file__).parent.parent / "src" / "xclim" / "data")
base_dir = Path(find_spec("xclim").origin).parent.joinpath("data").as_posix()
schema = "schema.yml"
yaml = ["cf.yml", "anuclim.yml", "icclim.yml"]

Expand Down

0 comments on commit 6c811fc

Please sign in to comment.