Skip to content

Commit

Permalink
fix(tests): load preprocessed deserialized data fixture globally
Browse files Browse the repository at this point in the history
Signed-off-by: Cameron Smith <cameron.ray.smith@gmail.com>
  • Loading branch information
cameronraysmith committed Sep 18, 2024
1 parent a096c8c commit 8752319
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/pyrovelocity/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from importlib.resources import files

import pytest
import scanpy as sc

from pyrovelocity.analysis.analyze import top_mae_genes
from pyrovelocity.io.compressedpickle import CompressedPickle
from pyrovelocity.io.serialization import load_anndata_from_json
from pyrovelocity.tasks.data import download_dataset
from pyrovelocity.tasks.postprocess import postprocess_dataset
from pyrovelocity.tasks.preprocess import preprocess_dataset
Expand All @@ -11,6 +14,14 @@
from pyrovelocity.utils import generate_sample_data


@pytest.fixture
def adata_preprocessed_pancreas_50_7():
fixture_file_path = (
files("pyrovelocity.tests.data") / "preprocessed_pancreas_50_7.json"
)
return load_anndata_from_json(fixture_file_path)


@pytest.fixture
def default_sample_data():
"""Default sample data from `pyrovelocity.utils.generate_sample_data`.
Expand Down

0 comments on commit 8752319

Please sign in to comment.