From 99e7adc546c5a4dbb9a7440559a957f6d790ef85 Mon Sep 17 00:00:00 2001 From: gfyoung Date: Fri, 30 Nov 2018 16:55:54 -0800 Subject: [PATCH] TST: Check error message in overlapping bins test Follow-up to gh-23999. xref gh-23922. --- pandas/tests/reshape/test_tile.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandas/tests/reshape/test_tile.py b/pandas/tests/reshape/test_tile.py index b0445f5a9e2d5..19f1a9a8b65c7 100644 --- a/pandas/tests/reshape/test_tile.py +++ b/pandas/tests/reshape/test_tile.py @@ -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):