Skip to content

Commit 316a5c2

Browse files
committed
Test also overlapping and non-consecutive bins merging
1 parent a4e14c7 commit 316a5c2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pineappl_py/tests/test_grid.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,14 @@ def test_merge(self):
201201

202202
g2.merge(g3)
203203
assert g2.bins() == 2
204+
205+
g4 = self.fake_grid([2, 3, 4])
206+
g5 = self.fake_grid([4, 5, 6])
207+
assert g4.bins() == 2
208+
assert g5.bins() == 2
209+
210+
with pytest.raises(ValueError, match="NonConsecutiveBins"):
211+
g2.merge(g4)
212+
213+
with pytest.raises(ValueError, match="NonConsecutiveBins"):
214+
g2.merge(g5)

0 commit comments

Comments
 (0)