-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* typeguard nit missed in #1960 * factor common fixtures into conftest.py * factor test_update_dataframes fixture * `verify_obs_var` helper, more `test_update_dataframes` factoring * test_experiment_query.py: verify #1988 * `s/h5ad_file/h5ad_path/g`, factor `HERE`s Co-authored-by: Ryan Williams <[email protected]>
- Loading branch information
1 parent
801b101
commit 082e395
Showing
13 changed files
with
249 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from tempfile import TemporaryDirectory | ||
|
||
import anndata | ||
import pytest | ||
|
||
import tiledbsoma | ||
import tiledbsoma.io | ||
|
||
from ._util import TESTDATA | ||
|
||
|
||
@pytest.fixture | ||
def h5ad_path(request): | ||
# pbmc-small is faster for automated unit-test / CI runs. | ||
return TESTDATA / "pbmc-small.h5ad" | ||
|
||
|
||
@pytest.fixture | ||
def adata(h5ad_path): | ||
return anndata.read_h5ad(h5ad_path) | ||
|
||
|
||
@pytest.fixture | ||
def h5ad_file_extended(request): | ||
# This has more component arrays in it | ||
return TESTDATA / "pbmc3k_processed.h5ad" | ||
|
||
|
||
@pytest.fixture | ||
def adata_extended(h5ad_file_extended): | ||
return anndata.read_h5ad(h5ad_file_extended) | ||
|
||
|
||
@pytest.fixture | ||
def pbmc_small(h5ad_path): | ||
"""Ingest an ``AnnData``, yield a ``TestCase`` with the original and new AnnData objects.""" | ||
with TemporaryDirectory() as exp_path: | ||
tiledbsoma.io.from_h5ad(exp_path, h5ad_path, measurement_name="RNA") | ||
with tiledbsoma.Experiment.open(exp_path) as exp: | ||
yield exp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.