Skip to content

Commit

Permalink
fix(tests): use importlib resources to refer to fixture data
Browse files Browse the repository at this point in the history
Signed-off-by: Cameron Smith <[email protected]>
  • Loading branch information
cameronraysmith committed Aug 13, 2024
1 parent 35c8937 commit 7175c79
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pyrovelocity/tests/plots/conftest.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from importlib.resources import files

import pytest

from pyrovelocity.io.serialization import load_anndata_from_json


@pytest.fixture
def adata_preprocessed():
return load_anndata_from_json(
"src/pyrovelocity/tests/data/preprocessed_3_4.json"
fixture_file_path = (
files("pyrovelocity.tests.data") / "preprocessed_3_4.json"
)
return load_anndata_from_json(fixture_file_path)

0 comments on commit 7175c79

Please sign in to comment.