Skip to content

Backport PR #4531 on branch 1.13.x (fix: match expression layers before reusing marker statistics) - #4554

Merged
flying-sheep merged 1 commit into
scverse:1.13.xfrom
meeseeksmachine:auto-backport-of-pr-4531-on-1.13.x
Nov 26, 2026
Merged

flying-sheep merged 1 commit into
scverse:1.13.xfrom
meeseeksmachine:auto-backport-of-pr-4531-on-1.13.x

Conversation

@meeseeksmachine

Copy link
Copy Markdown
Contributor

Backport PR #4531: fix: match expression layers before reusing marker statistics

@lumberbot-app lumberbot-app Bot added this to the 1.13.1 milestone Nov 26, 2026
@flying-sheep
flying-sheep merged commit 53c1a77 into scverse:1.13.x Nov 26, 2026
2 of 8 checks passed
@codecov

codecov Bot commented Nov 26, 2026

Copy link
Copy Markdown

❌ 13 Tests Failed:

Tests completed Failed Passed Skipped
2662 13 2649 1400
View the top 3 failed test(s) by shortest run time
tests/test_filter_rank_genes_groups.py::test_filter_rank_genes_groups_selected_matrix[False-None-None]
Stack Traces | 0.009s run time
rank_layer = None, filter_layer = None, pts = False

    #x1B[0m#x1B[37m@needs#x1B[39;49;00m.anndata_acc#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mrank_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mfilter_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mpts#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mFalse#x1B[39;49;00m, #x1B[94mTrue#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_filter_rank_genes_groups_selected_matrix#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        rank_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, filter_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, *, pts: #x1B[96mbool#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Cached fold changes and fractions must describe the matrix being filtered."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        x = np.log1p(np.array([[#x1B[94m8#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m10#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m], [#x1B[94m9#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m8#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m10#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m9#x1B[39;49;00m]]))#x1B[90m#x1B[39;49;00m
        adata = AnnData(x.copy())#x1B[90m#x1B[39;49;00m
        adata.obs[#x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m + [#x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        adata.layers[#x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = x[:, ::-#x1B[94m1#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
        rank_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m rank_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mrank_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        filter_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mfilter_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        rank_genes_groups(adata, #x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, method=#x1B[33m"#x1B[39;49;00m#x1B[33mt-test#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, use=rank_use, pts=pts)#x1B[90m#x1B[39;49;00m
        res = filter_rank_genes_groups(#x1B[90m#x1B[39;49;00m
            adata,#x1B[90m#x1B[39;49;00m
            use=filter_use,#x1B[90m#x1B[39;49;00m
            out=#x1B[94mTrue#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_in_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            max_out_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_fold_change=#x1B[94m1#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        expected = (#x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m) #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m (#x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mfor#x1B[39;49;00m group, gene #x1B[95min#x1B[39;49;00m #x1B[96mzip#x1B[39;49;00m((#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m), expected, strict=#x1B[94mTrue#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
            kept = res[#x1B[33m"#x1B[39;49;00m#x1B[33mnames#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][group]#x1B[90m#x1B[39;49;00m
>           #x1B[94massert#x1B[39;49;00m kept[~pd.isna(kept)].tolist() == [gene]#x1B[90m#x1B[39;49;00m
                         ^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           NameError: name 'pd' is not defined#x1B[0m

#x1B[1m#x1B[31mtests/test_filter_rank_genes_groups.py#x1B[0m:46: NameError
tests/test_filter_rank_genes_groups.py::test_filter_rank_genes_groups_selected_matrix[False-alternate-alternate]
Stack Traces | 0.009s run time
rank_layer = 'alternate', filter_layer = 'alternate', pts = False

    #x1B[0m#x1B[37m@needs#x1B[39;49;00m.anndata_acc#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mrank_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mfilter_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mpts#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mFalse#x1B[39;49;00m, #x1B[94mTrue#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_filter_rank_genes_groups_selected_matrix#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        rank_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, filter_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, *, pts: #x1B[96mbool#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Cached fold changes and fractions must describe the matrix being filtered."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        x = np.log1p(np.array([[#x1B[94m8#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m10#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m], [#x1B[94m9#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m8#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m10#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m9#x1B[39;49;00m]]))#x1B[90m#x1B[39;49;00m
        adata = AnnData(x.copy())#x1B[90m#x1B[39;49;00m
        adata.obs[#x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m + [#x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        adata.layers[#x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = x[:, ::-#x1B[94m1#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
        rank_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m rank_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mrank_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        filter_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mfilter_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        rank_genes_groups(adata, #x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, method=#x1B[33m"#x1B[39;49;00m#x1B[33mt-test#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, use=rank_use, pts=pts)#x1B[90m#x1B[39;49;00m
        res = filter_rank_genes_groups(#x1B[90m#x1B[39;49;00m
            adata,#x1B[90m#x1B[39;49;00m
            use=filter_use,#x1B[90m#x1B[39;49;00m
            out=#x1B[94mTrue#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_in_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            max_out_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_fold_change=#x1B[94m1#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        expected = (#x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m) #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m (#x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mfor#x1B[39;49;00m group, gene #x1B[95min#x1B[39;49;00m #x1B[96mzip#x1B[39;49;00m((#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m), expected, strict=#x1B[94mTrue#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
            kept = res[#x1B[33m"#x1B[39;49;00m#x1B[33mnames#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][group]#x1B[90m#x1B[39;49;00m
>           #x1B[94massert#x1B[39;49;00m kept[~pd.isna(kept)].tolist() == [gene]#x1B[90m#x1B[39;49;00m
                         ^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           NameError: name 'pd' is not defined#x1B[0m

#x1B[1m#x1B[31mtests/test_filter_rank_genes_groups.py#x1B[0m:46: NameError
tests/test_filter_rank_genes_groups.py::test_filter_rank_genes_groups_selected_matrix[True-None-None]
Stack Traces | 0.009s run time
rank_layer = None, filter_layer = None, pts = True

    #x1B[0m#x1B[37m@needs#x1B[39;49;00m.anndata_acc#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mrank_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mfilter_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mpts#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mFalse#x1B[39;49;00m, #x1B[94mTrue#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_filter_rank_genes_groups_selected_matrix#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        rank_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, filter_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, *, pts: #x1B[96mbool#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Cached fold changes and fractions must describe the matrix being filtered."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        x = np.log1p(np.array([[#x1B[94m8#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m10#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m], [#x1B[94m9#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m8#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m10#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m9#x1B[39;49;00m]]))#x1B[90m#x1B[39;49;00m
        adata = AnnData(x.copy())#x1B[90m#x1B[39;49;00m
        adata.obs[#x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m + [#x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        adata.layers[#x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = x[:, ::-#x1B[94m1#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
        rank_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m rank_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mrank_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        filter_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mfilter_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        rank_genes_groups(adata, #x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, method=#x1B[33m"#x1B[39;49;00m#x1B[33mt-test#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, use=rank_use, pts=pts)#x1B[90m#x1B[39;49;00m
        res = filter_rank_genes_groups(#x1B[90m#x1B[39;49;00m
            adata,#x1B[90m#x1B[39;49;00m
            use=filter_use,#x1B[90m#x1B[39;49;00m
            out=#x1B[94mTrue#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_in_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            max_out_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_fold_change=#x1B[94m1#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        expected = (#x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m) #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m (#x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mfor#x1B[39;49;00m group, gene #x1B[95min#x1B[39;49;00m #x1B[96mzip#x1B[39;49;00m((#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m), expected, strict=#x1B[94mTrue#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
            kept = res[#x1B[33m"#x1B[39;49;00m#x1B[33mnames#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][group]#x1B[90m#x1B[39;49;00m
>           #x1B[94massert#x1B[39;49;00m kept[~pd.isna(kept)].tolist() == [gene]#x1B[90m#x1B[39;49;00m
                         ^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           NameError: name 'pd' is not defined#x1B[0m

#x1B[1m#x1B[31mtests/test_filter_rank_genes_groups.py#x1B[0m:46: NameError
tests/test_filter_rank_genes_groups.py::test_filter_rank_genes_groups_selected_matrix[True-None-alternate]
Stack Traces | 0.009s run time
rank_layer = 'alternate', filter_layer = None, pts = True

    #x1B[0m#x1B[37m@needs#x1B[39;49;00m.anndata_acc#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mrank_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mfilter_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mpts#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mFalse#x1B[39;49;00m, #x1B[94mTrue#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_filter_rank_genes_groups_selected_matrix#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        rank_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, filter_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, *, pts: #x1B[96mbool#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Cached fold changes and fractions must describe the matrix being filtered."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        x = np.log1p(np.array([[#x1B[94m8#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m10#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m], [#x1B[94m9#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m8#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m10#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m9#x1B[39;49;00m]]))#x1B[90m#x1B[39;49;00m
        adata = AnnData(x.copy())#x1B[90m#x1B[39;49;00m
        adata.obs[#x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m + [#x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        adata.layers[#x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = x[:, ::-#x1B[94m1#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
        rank_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m rank_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mrank_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        filter_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mfilter_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        rank_genes_groups(adata, #x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, method=#x1B[33m"#x1B[39;49;00m#x1B[33mt-test#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, use=rank_use, pts=pts)#x1B[90m#x1B[39;49;00m
        res = filter_rank_genes_groups(#x1B[90m#x1B[39;49;00m
            adata,#x1B[90m#x1B[39;49;00m
            use=filter_use,#x1B[90m#x1B[39;49;00m
            out=#x1B[94mTrue#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_in_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            max_out_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_fold_change=#x1B[94m1#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        expected = (#x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m) #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m (#x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mfor#x1B[39;49;00m group, gene #x1B[95min#x1B[39;49;00m #x1B[96mzip#x1B[39;49;00m((#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m), expected, strict=#x1B[94mTrue#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
            kept = res[#x1B[33m"#x1B[39;49;00m#x1B[33mnames#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][group]#x1B[90m#x1B[39;49;00m
>           #x1B[94massert#x1B[39;49;00m kept[~pd.isna(kept)].tolist() == [gene]#x1B[90m#x1B[39;49;00m
                         ^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           NameError: name 'pd' is not defined#x1B[0m

#x1B[1m#x1B[31mtests/test_filter_rank_genes_groups.py#x1B[0m:46: NameError
tests/test_filter_rank_genes_groups.py::test_filter_rank_genes_groups_selected_matrix[False-None-alternate]
Stack Traces | 0.01s run time
rank_layer = 'alternate', filter_layer = None, pts = False

    #x1B[0m#x1B[37m@needs#x1B[39;49;00m.anndata_acc#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mrank_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mfilter_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mpts#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mFalse#x1B[39;49;00m, #x1B[94mTrue#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_filter_rank_genes_groups_selected_matrix#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        rank_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, filter_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, *, pts: #x1B[96mbool#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Cached fold changes and fractions must describe the matrix being filtered."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        x = np.log1p(np.array([[#x1B[94m8#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m10#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m], [#x1B[94m9#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m8#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m10#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m9#x1B[39;49;00m]]))#x1B[90m#x1B[39;49;00m
        adata = AnnData(x.copy())#x1B[90m#x1B[39;49;00m
        adata.obs[#x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m + [#x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        adata.layers[#x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = x[:, ::-#x1B[94m1#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
        rank_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m rank_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mrank_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        filter_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mfilter_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        rank_genes_groups(adata, #x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, method=#x1B[33m"#x1B[39;49;00m#x1B[33mt-test#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, use=rank_use, pts=pts)#x1B[90m#x1B[39;49;00m
        res = filter_rank_genes_groups(#x1B[90m#x1B[39;49;00m
            adata,#x1B[90m#x1B[39;49;00m
            use=filter_use,#x1B[90m#x1B[39;49;00m
            out=#x1B[94mTrue#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_in_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            max_out_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_fold_change=#x1B[94m1#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        expected = (#x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m) #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m (#x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mfor#x1B[39;49;00m group, gene #x1B[95min#x1B[39;49;00m #x1B[96mzip#x1B[39;49;00m((#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m), expected, strict=#x1B[94mTrue#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
            kept = res[#x1B[33m"#x1B[39;49;00m#x1B[33mnames#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][group]#x1B[90m#x1B[39;49;00m
>           #x1B[94massert#x1B[39;49;00m kept[~pd.isna(kept)].tolist() == [gene]#x1B[90m#x1B[39;49;00m
                         ^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           NameError: name 'pd' is not defined#x1B[0m

#x1B[1m#x1B[31mtests/test_filter_rank_genes_groups.py#x1B[0m:46: NameError
tests/test_filter_rank_genes_groups.py::test_filter_rank_genes_groups_selected_matrix[True-alternate-alternate]
Stack Traces | 0.01s run time
rank_layer = 'alternate', filter_layer = 'alternate', pts = True

    #x1B[0m#x1B[37m@needs#x1B[39;49;00m.anndata_acc#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mrank_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mfilter_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mpts#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mFalse#x1B[39;49;00m, #x1B[94mTrue#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_filter_rank_genes_groups_selected_matrix#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        rank_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, filter_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, *, pts: #x1B[96mbool#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Cached fold changes and fractions must describe the matrix being filtered."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        x = np.log1p(np.array([[#x1B[94m8#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m10#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m], [#x1B[94m9#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m8#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m10#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m9#x1B[39;49;00m]]))#x1B[90m#x1B[39;49;00m
        adata = AnnData(x.copy())#x1B[90m#x1B[39;49;00m
        adata.obs[#x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m + [#x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        adata.layers[#x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = x[:, ::-#x1B[94m1#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
        rank_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m rank_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mrank_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        filter_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mfilter_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        rank_genes_groups(adata, #x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, method=#x1B[33m"#x1B[39;49;00m#x1B[33mt-test#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, use=rank_use, pts=pts)#x1B[90m#x1B[39;49;00m
        res = filter_rank_genes_groups(#x1B[90m#x1B[39;49;00m
            adata,#x1B[90m#x1B[39;49;00m
            use=filter_use,#x1B[90m#x1B[39;49;00m
            out=#x1B[94mTrue#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_in_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            max_out_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_fold_change=#x1B[94m1#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        expected = (#x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m) #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m (#x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mfor#x1B[39;49;00m group, gene #x1B[95min#x1B[39;49;00m #x1B[96mzip#x1B[39;49;00m((#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m), expected, strict=#x1B[94mTrue#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
            kept = res[#x1B[33m"#x1B[39;49;00m#x1B[33mnames#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][group]#x1B[90m#x1B[39;49;00m
>           #x1B[94massert#x1B[39;49;00m kept[~pd.isna(kept)].tolist() == [gene]#x1B[90m#x1B[39;49;00m
                         ^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           NameError: name 'pd' is not defined#x1B[0m

#x1B[1m#x1B[31mtests/test_filter_rank_genes_groups.py#x1B[0m:46: NameError
tests/test_filter_rank_genes_groups.py::test_filter_rank_genes_groups_selected_matrix[False-alternate-None]
Stack Traces | 0.014s run time
rank_layer = None, filter_layer = 'alternate', pts = False

    #x1B[0m#x1B[37m@needs#x1B[39;49;00m.anndata_acc#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mrank_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mfilter_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mpts#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mFalse#x1B[39;49;00m, #x1B[94mTrue#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_filter_rank_genes_groups_selected_matrix#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        rank_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, filter_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, *, pts: #x1B[96mbool#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Cached fold changes and fractions must describe the matrix being filtered."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        x = np.log1p(np.array([[#x1B[94m8#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m10#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m], [#x1B[94m9#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m8#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m10#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m9#x1B[39;49;00m]]))#x1B[90m#x1B[39;49;00m
        adata = AnnData(x.copy())#x1B[90m#x1B[39;49;00m
        adata.obs[#x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m + [#x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        adata.layers[#x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = x[:, ::-#x1B[94m1#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
        rank_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m rank_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mrank_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        filter_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mfilter_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        rank_genes_groups(adata, #x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, method=#x1B[33m"#x1B[39;49;00m#x1B[33mt-test#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, use=rank_use, pts=pts)#x1B[90m#x1B[39;49;00m
        res = filter_rank_genes_groups(#x1B[90m#x1B[39;49;00m
            adata,#x1B[90m#x1B[39;49;00m
            use=filter_use,#x1B[90m#x1B[39;49;00m
            out=#x1B[94mTrue#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_in_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            max_out_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_fold_change=#x1B[94m1#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        expected = (#x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m) #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m (#x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mfor#x1B[39;49;00m group, gene #x1B[95min#x1B[39;49;00m #x1B[96mzip#x1B[39;49;00m((#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m), expected, strict=#x1B[94mTrue#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
            kept = res[#x1B[33m"#x1B[39;49;00m#x1B[33mnames#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][group]#x1B[90m#x1B[39;49;00m
>           #x1B[94massert#x1B[39;49;00m kept[~pd.isna(kept)].tolist() == [gene]#x1B[90m#x1B[39;49;00m
                         ^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           NameError: name 'pd' is not defined#x1B[0m

#x1B[1m#x1B[31mtests/test_filter_rank_genes_groups.py#x1B[0m:46: NameError
tests/test_filter_rank_genes_groups.py::test_filter_rank_genes_groups_selected_matrix[True-alternate-None]
Stack Traces | 0.016s run time
rank_layer = None, filter_layer = 'alternate', pts = True

    #x1B[0m#x1B[37m@needs#x1B[39;49;00m.anndata_acc#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mrank_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mfilter_layer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mNone#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mpts#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mFalse#x1B[39;49;00m, #x1B[94mTrue#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_filter_rank_genes_groups_selected_matrix#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        rank_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, filter_layer: #x1B[96mstr#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m, *, pts: #x1B[96mbool#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    ) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Cached fold changes and fractions must describe the matrix being filtered."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        x = np.log1p(np.array([[#x1B[94m8#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m10#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m], [#x1B[94m9#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m8#x1B[39;49;00m], [#x1B[94m1#x1B[39;49;00m, #x1B[94m10#x1B[39;49;00m], [#x1B[94m0#x1B[39;49;00m, #x1B[94m9#x1B[39;49;00m]]))#x1B[90m#x1B[39;49;00m
        adata = AnnData(x.copy())#x1B[90m#x1B[39;49;00m
        adata.obs[#x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = [#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m + [#x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] * #x1B[94m3#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        adata.layers[#x1B[33m"#x1B[39;49;00m#x1B[33malternate#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = x[:, ::-#x1B[94m1#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
        rank_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m rank_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mrank_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        filter_use = #x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mlayers.#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mfilter_layer#x1B[33m}#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        rank_genes_groups(adata, #x1B[33m"#x1B[39;49;00m#x1B[33mgroup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, method=#x1B[33m"#x1B[39;49;00m#x1B[33mt-test#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, use=rank_use, pts=pts)#x1B[90m#x1B[39;49;00m
        res = filter_rank_genes_groups(#x1B[90m#x1B[39;49;00m
            adata,#x1B[90m#x1B[39;49;00m
            use=filter_use,#x1B[90m#x1B[39;49;00m
            out=#x1B[94mTrue#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_in_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            max_out_group_fraction=#x1B[94m0.5#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            min_fold_change=#x1B[94m1#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        expected = (#x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m) #x1B[94mif#x1B[39;49;00m filter_layer #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[94melse#x1B[39;49;00m (#x1B[33m"#x1B[39;49;00m#x1B[33m1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m0#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mfor#x1B[39;49;00m group, gene #x1B[95min#x1B[39;49;00m #x1B[96mzip#x1B[39;49;00m((#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m), expected, strict=#x1B[94mTrue#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
            kept = res[#x1B[33m"#x1B[39;49;00m#x1B[33mnames#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][group]#x1B[90m#x1B[39;49;00m
>           #x1B[94massert#x1B[39;49;00m kept[~pd.isna(kept)].tolist() == [gene]#x1B[90m#x1B[39;49;00m
                         ^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           NameError: name 'pd' is not defined#x1B[0m

#x1B[1m#x1B[31mtests/test_filter_rank_genes_groups.py#x1B[0m:46: NameError
src/scanpy/get/get.py::scanpy.get.get.rank_genes_groups_df
Stack Traces | 0.049s run time
055 log2fc_max
056     Maximum logfc to return.
057 gene_symbols
058     Column name in `.var` DataFrame that stores gene symbols. Specifying
059     this will add that column to the returned dataframe.
060 
061 Example
062 -------
063 >>> import scanpy as sc
064 >>> pbmc = sc.datasets.pbmc68k_reduced()
Expected nothing
Got:
    ResourceWarning: unclosed <ssl.SSLSocket [closed] fd=23, family=2, type=1, proto=6>
        def decode(self,input,errors='strict'):
    ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
        _warnings.warn(self.warn_message, ResourceWarning)

#x1B[1m#x1B[.../scanpy/get/get.py#x1B[0m:64: DocTestFailure
tests/test_datasets.py::test_doc_shape[burczynski06]
Stack Traces | 0.834s run time
+ Exception Group Traceback (most recent call last):
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14....../site-packages/_pytest/runner.py", line 361, in from_call
  |     result: TResult | None = func()
  |                              ~~~~^^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14....../site-packages/_pytest/runner.py", line 250, in <lambda>
  |     lambda: runtest_hook(item=item, **kwds),
  |             ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/pluggy/_caller.py", line 197, in __call__
  |     return self._hookexec(
  |            ~~~~~~~~~~~~~~^
  |         self.name, self._hookimpls.copy(), call_kwargs, firstresult
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |     )
  |     ^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/pluggy/_manager.py", line 183, in _hookexec
  |     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  |            ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/logging.py", line 878, in pytest_runtest_call
  |     yield
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/capture.py", line 906, in pytest_runtest_call
  |     return (yield)
  |             ^^^^^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/skipping.py", line 268, in pytest_runtest_call
  |     return (yield)
  |             ^^^^^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 179, in pytest_runtest_call
  |     collect_unraisable(item.config)
  |     ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 77, in collect_unraisable
  |     raise ExceptionGroup("multiple unraisable exception warnings", errors)
  | ExceptionGroup: multiple unraisable exception warnings (5 sub-exceptions)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py", line 538, in __del__
    |     _warnings.warn(self.warn_message, ResourceWarning)
    |     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
    | 
    | The above exception was the direct cause of the following exception:
    | 
    | Traceback (most recent call last):
    |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 63, in collect_unraisable
    |     warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
    |     ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x79bb2a63e350>: None
    | 
    +---------------- 2 ----------------
    | Traceback (most recent call last):
    |   File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py", line 538, in __del__
    |     _warnings.warn(self.warn_message, ResourceWarning)
    |     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
    | 
    | The above exception was the direct cause of the following exception:
    | 
    | Traceback (most recent call last):
    |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 63, in collect_unraisable
    |     warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
    |     ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x79bb2a63e350>: None
    | 
    +---------------- 3 ----------------
    | Traceback (most recent call last):
    |   File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py", line 538, in __del__
    |     _warnings.warn(self.warn_message, ResourceWarning)
    |     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
    | 
    | The above exception was the direct cause of the following exception:
    | 
    | Traceback (most recent call last):
    |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 63, in collect_unraisable
    |     warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
    |     ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x79bb2a63e350>: None
    | 
    +---------------- 4 ----------------
    | Traceback (most recent call last):
    |   File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py", line 538, in __del__
    |     _warnings.warn(self.warn_message, ResourceWarning)
    |     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
    | 
    | The above exception was the direct cause of the following exception:
    | 
    | Traceback (most recent call last):
    |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 63, in collect_unraisable
    |     warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
    |     ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x79bb2a63e350>: None
    | 
    +---------------- 5 ----------------
    | Traceback (most recent call last):
    |   File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py", line 538, in __del__
    |     _warnings.warn(self.warn_message, ResourceWarning)
    |     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
    | 
    | The above exception was the direct cause of the following exception:
    | 
    | Traceback (most recent call last):
    |   File "........................................../home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14...................../site-packages/_pytest/unraisableexception.py", line 63, in collect_unraisable
    |     warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
    |     ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x79bb2a63e350>: None
    | 
    +------------------------------------
src/scanpy/datasets/_ebi_expression_atlas.py::scanpy.datasets._ebi_expression_atlas.ebi_expression_atlas
Stack Traces | 0.871s run time
133     labels with a single or :attr:`~anndata.AnnData.n_obs` distinct values.
134 
135 Returns
136 -------
137 Annotated data matrix.
138 
139 Example
140 -------
141 >>> import scanpy as sc
142 >>> sc.datasets.ebi_expression_atlas("E-ENAD-19")  # doctest: +ELLIPSIS
UNEXPECTED EXCEPTION: <HTTPError 403: 'Forbidden'>
Traceback (most recent call last):
  File "<doctest scanpy.datasets._ebi_expression_atlas.ebi_expression_atlas[1]>", line 1, in <module>
  File ".../scanpy/datasets/_ebi_expression_atlas.py", line 159, in ebi_expression_atlas
    download_experiment(accession)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File ".../scanpy/datasets/_utils.py", line 22, in wrapper
    return f(*args, **kwargs)
  File ".../scanpy/datasets/_ebi_expression_atlas.py", line 48, in download_experiment
    sniff_url(accession)
    ~~~~~~~~~^^^^^^^^^^^
  File ".../scanpy/datasets/_ebi_expression_atlas.py", line 39, in sniff_url
    with urlopen(base_url):  # Check if server up/ dataset exists
         ~~~~~~~^^^^^^^^^^
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 187, in urlopen
    return opener.open(url, data, timeout)
           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 493, in open
    response = meth(req, response)
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 602, in http_response
    response = self.parent.error(
        'http', request, response, code, msg, hdrs)
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 531, in error
    return self._call_chain(*args)
           ~~~~~~~~~~~~~~~~^^^^^^^
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 464, in _call_chain
    result = func(*args)
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 611, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
https://www.ebi.ac..../sc/experiments/E-ENAD-19/
#x1B[1m#x1B[31m.../scanpy/datasets/_ebi_expression_atlas.py#x1B[0m:142: UnexpectedException
tests/test_datasets.py::test_ebi_expression_atlas
Stack Traces | 4.24s run time
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x79bac4b58ad0>

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.internet#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_ebi_expression_atlas#x1B[39;49;00m(monkeypatch: pytest.MonkeyPatch):#x1B[90m#x1B[39;49;00m
        #x1B[94mfrom#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[04m#x1B[96mscanpy#x1B[39;49;00m#x1B[04m#x1B[96m.#x1B[39;49;00m#x1B[04m#x1B[96mdatasets#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[94mimport#x1B[39;49;00m _ebi_expression_atlas #x1B[94mas#x1B[39;49;00m ea_mod#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[90m# make sure we use chunks when testing.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# This dataset has ~31k entries, so 20k entries/chunk = 2 chunks#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96mhasattr#x1B[39;49;00m(ea_mod, #x1B[33m"#x1B[39;49;00m#x1B[33mCHUNK_SIZE#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        monkeypatch.setattr(ea_mod, #x1B[33m"#x1B[39;49;00m#x1B[33mCHUNK_SIZE#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[94m20_000#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[90m# a tiny dataset (~160kB), since EBI’s downloads can be very slow#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
>       adata = sc.datasets.ebi_expression_atlas(#x1B[33m"#x1B[39;49;00m#x1B[33mE-ENAD-19#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_datasets.py#x1B[0m:110: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/datasets/_ebi_expression_atlas.py#x1B[0m:159: in ebi_expression_atlas
    #x1B[0mdownload_experiment(accession)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/datasets/_utils.py#x1B[0m:22: in wrapper
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m f(*args, **kwargs)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/datasets/_ebi_expression_atlas.py#x1B[0m:48: in download_experiment
    #x1B[0msniff_url(accession)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/datasets/_ebi_expression_atlas.py#x1B[0m:39: in sniff_url
    #x1B[0m#x1B[94mwith#x1B[39;49;00m urlopen(base_url):  #x1B[90m# Check if server up/ dataset exists#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
         ^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:187: in urlopen
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m opener.open(url, data, timeout)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:493: in open
    #x1B[0mresponse = meth(req, response)#x1B[90m#x1B[39;49;00m
               ^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:602: in http_response
    #x1B[0mresponse = #x1B[96mself#x1B[39;49;00m.parent.error(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:531: in error
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._call_chain(*args)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:464: in _call_chain
    #x1B[0mresult = func(*args)#x1B[90m#x1B[39;49;00m
             ^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <urllib.request.HTTPDefaultErrorHandler object at 0x79baed3a4ec0>
req = <urllib.request.Request object at 0x79babcc39590>
fp = <http.client.HTTPResponse object at 0x79baaca1a2f0>, code = 403
msg = 'Forbidden', hdrs = <http.client.HTTPMessage object at 0x79bad4378e10>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mhttp_error_default#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m, req, fp, code, msg, hdrs):#x1B[90m#x1B[39;49;00m
>       #x1B[94mraise#x1B[39;49;00m HTTPError(req.full_url, code, msg, hdrs, fp)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       urllib.error.HTTPError: HTTP Error 403: Forbidden#x1B[0m
#x1B[1m#x1B[31mE       https://www.ebi.ac..../sc/experiments/E-ENAD-19/#x1B[0m

#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:611: HTTPError
tests/test_bbknn.py::test_bbknn_transformer[wide-pynndescent]
Stack Traces | 24.4s run time
self = <tempfile._TemporaryFileCloser object at 0x79babcc6e750>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92m__del__#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
        close_called = #x1B[96mself#x1B[39;49;00m.close_called#x1B[90m#x1B[39;49;00m
        #x1B[96mself#x1B[39;49;00m.cleanup()#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m close_called:#x1B[90m#x1B[39;49;00m
>           _warnings.warn(#x1B[96mself#x1B[39;49;00m.warn_message, #x1B[96mResourceWarning#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>#x1B[0m

#x1B[1m#x1B[31m../...../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py#x1B[0m:538: ResourceWarning

#x1B[33mThe above exception was the direct cause of the following exception:#x1B[0m

cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x79babc9cf5e0>
when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    #x1B[0m#x1B[37m@classmethod#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mfrom_call#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        #x1B[96mcls#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        func: Callable[[], TResult],#x1B[90m#x1B[39;49;00m
        when: Literal[#x1B[33m"#x1B[39;49;00m#x1B[33mcollect#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33msetup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mcall#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mteardown#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
        reraise: #x1B[96mtype#x1B[39;49;00m[#x1B[96mBaseException#x1B[39;49;00m] | #x1B[96mtuple#x1B[39;49;00m[#x1B[96mtype#x1B[39;49;00m[#x1B[96mBaseException#x1B[39;49;00m], ...] | #x1B[94mNone#x1B[39;49;00m = #x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
    ) -> CallInfo[TResult]:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Call func, wrapping the result in a CallInfo.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    :param func:#x1B[39;49;00m
    #x1B[33m        The function to call. Called without arguments.#x1B[39;49;00m
    #x1B[33m    :type func: Callable[[], _pytest.runner.TResult]#x1B[39;49;00m
    #x1B[33m    :param when:#x1B[39;49;00m
    #x1B[33m        The phase in which the function is called.#x1B[39;49;00m
    #x1B[33m    :param reraise:#x1B[39;49;00m
    #x1B[33m        Exception or exceptions that shall propagate if raised by the#x1B[39;49;00m
    #x1B[33m        function, instead of being wrapped in the CallInfo.#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        excinfo = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        instant = timing.Instant()#x1B[90m#x1B[39;49;00m
        #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
>           result: TResult | #x1B[94mNone#x1B[39;49;00m = func()#x1B[90m#x1B[39;49;00m
                                     ^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14....../site-packages/_pytest/runner.py#x1B[0m:361: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14....../site-packages/_pytest/runner.py#x1B[0m:250: in <lambda>
    #x1B[0m#x1B[94mlambda#x1B[39;49;00m: runtest_hook(item=item, **kwds),#x1B[90m#x1B[39;49;00m
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/pluggy/_caller.py#x1B[0m:197: in __call__
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._hookexec(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/pluggy/_manager.py#x1B[0m:183: in _hookexec
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._inner_hookexec(hook_name, methods, kwargs, firstresult)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/logging.py#x1B[0m:878: in pytest_runtest_call
    #x1B[0m#x1B[94myield#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/capture.py#x1B[0m:906: in pytest_runtest_call
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m (#x1B[94myield#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
            ^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/skipping.py#x1B[0m:268: in pytest_runtest_call
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m (#x1B[94myield#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
            ^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14........./site-packages/_pytest/unraisableexception.py#x1B[0m:179: in pytest_runtest_call
    #x1B[0mcollect_unraisable(item.config)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14........./site-packages/_pytest/unraisableexception.py#x1B[0m:75: in collect_unraisable
    #x1B[0m#x1B[94mraise#x1B[39;49;00m errors[#x1B[94m0#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

config = <_pytest.config.Config object at 0x79bb2a1fc2f0>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mcollect_unraisable#x1B[39;49;00m(config: Config) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        pop_unraisable = config.stash[unraisable_exceptions].pop#x1B[90m#x1B[39;49;00m
        errors: #x1B[96mlist#x1B[39;49;00m[pytest.PytestUnraisableExceptionWarning | #x1B[96mRuntimeError#x1B[39;49;00m] = []#x1B[90m#x1B[39;49;00m
        meta = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        hook_error = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
            #x1B[94mwhile#x1B[39;49;00m #x1B[94mTrue#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
                #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
                    meta = pop_unraisable()#x1B[90m#x1B[39;49;00m
                #x1B[94mexcept#x1B[39;49;00m #x1B[96mIndexError#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
                    #x1B[94mbreak#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
                #x1B[94mif#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(meta, #x1B[96mBaseException#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
                    hook_error = #x1B[96mRuntimeError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mFailed to process unraisable exception#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
                    hook_error.__cause__ = meta#x1B[90m#x1B[39;49;00m
                    errors.append(hook_error)#x1B[90m#x1B[39;49;00m
                    #x1B[94mcontinue#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
                msg = meta.msg#x1B[90m#x1B[39;49;00m
                #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
>                   warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE                   pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x79bb2a63e350>: None#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14........./site-packages/_pytest/unraisableexception.py#x1B[0m:63: PytestUnraisableExceptionWarning

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants