From 82a3f86dd83748a71f3fad42f018917064977d07 Mon Sep 17 00:00:00 2001 From: Isaac Virshup Date: Mon, 8 Jul 2024 15:38:09 -0700 Subject: [PATCH] Update tests to account for stable release not having embeddings (#1226) --- api/python/cellxgene_census/tests/conftest.py | 2 +- .../tests/experimental/test_embeddings.py | 4 ++++ api/python/cellxgene_census/tests/test_get_anndata.py | 10 ---------- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/api/python/cellxgene_census/tests/conftest.py b/api/python/cellxgene_census/tests/conftest.py index cbdfd969e..3a6b44ce0 100644 --- a/api/python/cellxgene_census/tests/conftest.py +++ b/api/python/cellxgene_census/tests/conftest.py @@ -67,4 +67,4 @@ def census() -> soma.Collection: def lts_census() -> soma.Collection: import cellxgene_census - return cellxgene_census.open_soma(census_version="stable") + return cellxgene_census.open_soma(census_version="2023-12-15") diff --git a/api/python/cellxgene_census/tests/experimental/test_embeddings.py b/api/python/cellxgene_census/tests/experimental/test_embeddings.py index ac5bf3872..4ee1ad579 100644 --- a/api/python/cellxgene_census/tests/experimental/test_embeddings.py +++ b/api/python/cellxgene_census/tests/experimental/test_embeddings.py @@ -77,6 +77,10 @@ def test_get_embedding_metadata_by_name(requests_mock: rm.Mocker) -> None: ) +@pytest.mark.xfail( + strict=True, + reason="Current stable release doesn't have embeddings available. This xfail should be removed once that's resolved.", +) def test_get_embedding_by_name_w_version_aliases() -> None: """https://github.com/chanzuckerberg/cellxgene-census/issues/1202""" # Only testing "stable" as "latest" doesn't have embeddings diff --git a/api/python/cellxgene_census/tests/test_get_anndata.py b/api/python/cellxgene_census/tests/test_get_anndata.py index 71ef42eb7..e03452f38 100644 --- a/api/python/cellxgene_census/tests/test_get_anndata.py +++ b/api/python/cellxgene_census/tests/test_get_anndata.py @@ -8,16 +8,6 @@ import cellxgene_census -@pytest.fixture(scope="session") -def census() -> soma.Collection: - return cellxgene_census.open_soma(census_version="latest") - - -@pytest.fixture(scope="session") -def lts_census() -> soma.Collection: - return cellxgene_census.open_soma(census_version="stable") - - @pytest.mark.live_corpus def test_get_anndata_value_filter(census: soma.Collection) -> None: ad = cellxgene_census.get_anndata(