Skip to content

Commit

Permalink
Simplify BinTable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robomics committed Nov 11, 2024
1 parent 6cc6b29 commit 671bbd9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/test_bin_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,16 @@ def test_getters(self):
bins.get_id("abc", 100)

@pytest.mark.skipif(
not numpy_avail() or not pandas_avail() or not pyarrow_avail(),
reason="numpy, pandas, or pyarrow are not available",
not pandas_avail() or not pyarrow_avail(),
reason="pandas or pyarrow are not available",
)
def test_vectorized_getters(self):
import numpy as np

chroms = {"chr1": 1000, "chr2": 500}
bins = hictkpy.BinTable(chroms, 100)

assert len(bins.get(np.array([1, 1]))) == 2
assert len(bins.get_ids(np.array(["chr1", "chr1"]), np.array([1, 1]))) == 2
assert len(bins.get([1, 1])) == 2
assert len(bins.get_ids(["chr1", "chr1"], [1, 1])) == 2

@pytest.mark.skipif(not pandas_avail() or not pyarrow_avail(), reason="pandas is not available")
def test_merge(self):
Expand Down

0 comments on commit 671bbd9

Please sign in to comment.