Skip to content

Commit

Permalink
[python] Add test case for issue 768 -- existence of `ExperimentAxisQ…
Browse files Browse the repository at this point in the history
…uery.get_indexer()` (#769)

* add test case for issue 768

* lint
  • Loading branch information
Bruce Martin authored Jan 20, 2023
1 parent 8aac1e9 commit d8c1476
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apis/python/tests/test_experiment_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,11 @@ def test_experiment_query_indexer(soma_experiment):
obs_query=AxisQuery(coords=(slice(1, 10),)),
var_query=AxisQuery(coords=(slice(1, 10),)),
) as query:
indexer = query._indexer
# TODO: remove this work-around once a new `somacore` is released.
# workaround:
indexer = getattr(query, "indexer", query._indexer)
# future version:
# indexer = query.indexer

# coords outside of our query should return -1
assert np.array_equal(
Expand Down

0 comments on commit d8c1476

Please sign in to comment.