Skip to content

Commit b915b47

Browse files
committed
add initial test
1 parent 8ea23ff commit b915b47

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/reshape/test_qcut.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,16 @@ def test_qcut_return_intervals():
130130
tm.assert_series_equal(res, exp)
131131

132132

133+
@pytest.mark.parametrize("values", ['foo', 1, list(range(10))])
134+
def test_qcut_labels_true():
135+
# issue 13318
136+
msg = "User desired bin labels must be passed in as an argument, not just `True`"
137+
with pytest.raises(ValueError) as w:
138+
qcut(values, 5, labels=True)
139+
140+
assert w[0].message[0] == msg
141+
142+
133143
@pytest.mark.parametrize(
134144
"kwargs,msg",
135145
[

0 commit comments

Comments
 (0)