Skip to content

Commit 024d54f

Browse files
author
MomIsBestFriend
committed
Fixes for @jreback review
1 parent 8c504b8 commit 024d54f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/tests/frame/test_analytics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2617,7 +2617,7 @@ def test_n(self, df_strings, nselect_method, n, order):
26172617

26182618
error_msg = (
26192619
f"Column 'b' has dtype object, "
2620-
f"cannot use method {repr(nselect_method)} with this dtype"
2620+
f"cannot use method '{nselect_method} with this dtype"
26212621
)
26222622
with pytest.raises(TypeError, match=error_msg):
26232623
getattr(df, nselect_method)(n, order)

pandas/tests/indexes/datetimes/test_datetime.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def test_week_of_month_frequency(self):
8989
def test_hash_error(self):
9090
index = date_range("20010101", periods=10)
9191
with pytest.raises(
92-
TypeError, match=f"unhashable type: {repr(type(index).__name__)}"
92+
TypeError, match=f"unhashable type: '{type(index).__name__}'"
9393
):
9494
hash(index)
9595

0 commit comments

Comments
 (0)