Skip to content

Commit

Permalink
Test also overlapping and non-consecutive bins merging
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Oct 24, 2023
1 parent a4e14c7 commit 316a5c2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pineappl_py/tests/test_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,14 @@ def test_merge(self):

g2.merge(g3)
assert g2.bins() == 2

g4 = self.fake_grid([2, 3, 4])
g5 = self.fake_grid([4, 5, 6])
assert g4.bins() == 2
assert g5.bins() == 2

with pytest.raises(ValueError, match="NonConsecutiveBins"):
g2.merge(g4)

with pytest.raises(ValueError, match="NonConsecutiveBins"):
g2.merge(g5)

0 comments on commit 316a5c2

Please sign in to comment.