Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 29, 2025
commit be331f3446447239e698c899522083cdec226b38
4 changes: 2 additions & 2 deletions tests/pl/test_render_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def test_plot_label_categorical_color_and_colors_in_uns_query_uns_colors_removed
# Why? Because `.bounding_box_query` removes "category_colors" that are not in the query,
# but restores original number of catergories in `.obs["category"]`, see https://github.com/scverse/anndata/issues/997,
# leading to mismatch and removal of "category_colors" by `.filter_by_coordinate_system`.
assert all(sdata_blobs["other_table"].obs["category"].unique() == [ "a", "c" ])
assert all(sdata_blobs["other_table"].obs["category"].unique() == ["a", "c"])
assert all(sdata_blobs["other_table"].uns["category_colors"] == ["#800080", "#FFFF00"])
# but due to https://github.com/scverse/anndata/issues/997:
assert all(sdata_blobs["other_table"].obs["category"].cat.categories == ["a", "b", "c"])
Expand All @@ -259,7 +259,7 @@ def test_plot_label_categorical_color_and_colors_in_uns_query_workaround(self, s
max_coordinate=[100, 100],
target_coordinate_system="global",
)
assert all(sdata_blobs["other_table"].obs["category"].unique() == [ "a", "c" ])
assert all(sdata_blobs["other_table"].obs["category"].unique() == ["a", "c"])
assert all(sdata_blobs["other_table"].uns["category_colors"] == ["#800080", "#FFFF00"])
# but due to https://github.com/scverse/anndata/issues/997:
assert all(sdata_blobs["other_table"].obs["category"].cat.categories == ["a", "b", "c"])
Expand Down
Loading