Skip to content

Commit

Permalink
Add test that non-byte aligned datasets raise
Browse files Browse the repository at this point in the history
  • Loading branch information
hardbyte committed Nov 13, 2020
1 parent 045a653 commit 47ca356
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_similarity_dice.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ def test_not_multiple_of_64(self, k, threshold, bytes_n):
c_similarity = similarities.dice_coefficient_accelerated(datasets, threshold, k=k)
self.assert_similarity_matrices_equal(py_similarity, c_similarity)


def test_not_multiple_of_8_raises(self,):
datasets = [[bitarray('010')],
[bitarray('010')]]
with pytest.raises(NotImplementedError):
similarities.dice_coefficient_accelerated(datasets, threshold=self.default_threshold)

@pytest.mark.parametrize('sim_fun', SIM_FUNS)
@pytest.mark.parametrize('k', [None, 0, 1])
Expand Down

0 comments on commit 47ca356

Please sign in to comment.