Skip to content

Commit

Permalink
test_experiment_query.py: verify #1988
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-williams committed Mar 21, 2024
1 parent ffa6182 commit 6dbb9a0
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion apis/python/tests/test_experiment_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pyarrow as pa
import pytest
from scipy import sparse
from somacore import options
from somacore import AxisQuery, options

import tiledbsoma as soma
from tests._util import raises_no_typeguard
Expand Down Expand Up @@ -905,3 +905,17 @@ def test_experiment_query_uses_threadpool_from_context(soma_experiment):
assert adata is not None

pool.submit.assert_called()


def test_empty_categorical_query(pbmc_small):
q = pbmc_small.axis_query(
measurement_name="RNA", obs_query=AxisQuery(value_filter='groups == "g1"')
)
obs = q.obs().concat()
assert len(obs) == 44

q = pbmc_small.axis_query(
measurement_name="RNA", obs_query=AxisQuery(value_filter='groups == "foo"')
)
obs = q.obs().concat()
assert len(obs) == 0

0 comments on commit 6dbb9a0

Please sign in to comment.