Skip to content

Commit

Permalink
tests: Skip telemac tests if telapy is not available.
Browse files Browse the repository at this point in the history
Also cleanup the imports a bit.
  • Loading branch information
pmav99 committed Mar 21, 2024
1 parent a8cc482 commit 900e64b
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions tests/test_telemac.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
import pytest
import pyposeidon
from pyposeidon.utils import data
import os
import multiprocessing

# from . import DATA_DIR
import pathlib

# specify package paths
ROOT_DIR = pathlib.Path(__file__).resolve().parent.parent
TEST_DIR = ROOT_DIR / "tests"
DATA_DIR = TEST_DIR / "data"
ROTATED_DIR = DATA_DIR / "rotated"
import pyposeidon
import pytest

from . import DATA_DIR

DATA_DIR.mkdir(exist_ok=True)
ROTATED_DIR.mkdir(exist_ok=True)
try:
import telapy
except ImportError:
pytest.skip(reason="requires telapy", allow_module_level=True)


MESH_FILE = (DATA_DIR / "hgrid.gr3").as_posix()
Expand Down

0 comments on commit 900e64b

Please sign in to comment.