Skip to content

Commit

Permalink
Filter uninformative warning from test output
Browse files Browse the repository at this point in the history
  • Loading branch information
pkalita-lbl committed Aug 1, 2024
1 parent ad543f4 commit 23696d9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 8 additions & 5 deletions tests/test_data.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
"""Data test."""
import os

import glob
import os

import pytest
from linkml_runtime.loaders import yaml_loader
from gocam.datamodel import Model

ROOT = os.path.join(os.path.dirname(__file__), '..')
DATA_DIR = os.path.join(ROOT, "src", "data", "examples")
from gocam.datamodel import Model
from tests import EXAMPLES_DIR

EXAMPLE_FILES = glob.glob(os.path.join(DATA_DIR, '*.yaml'))
EXAMPLE_FILES = glob.glob(os.path.join(EXAMPLES_DIR, "*.yaml"))


# linkml-linkml_runtime.loaders.yaml_loader still uses load_obj. Disable capturing this warning.
@pytest.mark.filterwarnings("ignore::pydantic.warnings.PydanticDeprecatedSince20")
def test_data():
"""Data test."""
for path in EXAMPLE_FILES:
Expand Down
4 changes: 3 additions & 1 deletion tests/test_translation/test_minerva_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def test_api(model_local_id):
assert model is not None


@pytest.mark.parametrize("base_name", ["minerva-663d668500002178", "minerva-5b91dbd100002057"])
@pytest.mark.parametrize(
"base_name", ["minerva-663d668500002178", "minerva-5b91dbd100002057"]
)
def test_object(base_name):
mw = MinervaWrapper()
with open(INPUT_DIR / f"{base_name}.json", "r") as f:
Expand Down

0 comments on commit 23696d9

Please sign in to comment.