Skip to content

Commit d7b2e3e

Browse files
committed
P converted tm to pytest
1 parent f3323f4 commit d7b2e3e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/tests/reshape/test_tile.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ def test_str_bins(self):
5858

5959
# Test that a `bin` string not present in `np.histogram_bin_edges`
6060
# throws a ValueError.
61-
tm.assert_raises_regex(ValueError,
62-
"'*' is not a valid estimator for `bins`",
63-
cut, data, "bad bins")
61+
with pytest.raises(ValueError,
62+
match="'*' is not a valid estimator for `bins`",
63+
message="Verify acceptable bins in `np.histogram_bin_edges`."):
64+
cut(data, bins="bad bins")
6465

6566
def test_right(self):
6667
data = np.array([.2, 1.4, 2.5, 6.2, 9.7, 2.1, 2.575])

0 commit comments

Comments
 (0)