Skip to content

Commit

Permalink
TST: Check error message in overlapping bins test (#24029)
Browse files Browse the repository at this point in the history
Follow-up to gh-23999.

xref gh-23922.
  • Loading branch information
gfyoung authored Dec 1, 2018
1 parent fa547d8 commit 5b6b346
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pandas/tests/reshape/test_tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ def test_bins_from_intervalindex(self):
np.array([1, 1, 2], dtype='int8'))

def test_bins_not_overlapping_from_intervalindex(self):
# verify if issue 23980 is properly solved.
# see gh-23980
msg = "Overlapping IntervalIndex is not accepted"
ii = IntervalIndex.from_tuples([(0, 10), (2, 12), (4, 14)])
with pytest.raises(ValueError):

with pytest.raises(ValueError, match=msg):
cut([5, 6], bins=ii)

def test_bins_not_monotonic(self):
Expand Down

0 comments on commit 5b6b346

Please sign in to comment.