Skip to content

Commit 5544823

Browse files
author
MomIsBestFriend
committed
Merge remote-tracking branch 'upstream/master' into STY-repr-batch-5
1 parent 3f5fa5f commit 5544823

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

ci/deps/azure-windows-36.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ dependencies:
2020
- numexpr
2121
- numpy=1.15.*
2222
- openpyxl
23+
- jinja2
2324
- pyarrow>=0.12.0
2425
- pytables
2526
- python-dateutil

pandas/tests/groupby/test_whitelist.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,13 @@ def test_groupby_blacklist(df_letters):
242242

243243
# e.g., to_csv
244244
defined_but_not_allowed = (
245-
f"(?:^Cannot.+{repr(bl)}.+{repr(type(gb).__name__)}.+try "
245+
f"(?:^Cannot.+{repr(bl)}.+'{type(gb).__name__}'.+try "
246246
f"using the 'apply' method$)"
247247
)
248248

249249
# e.g., query, eval
250250
not_defined = (
251-
f"(?:^{repr(type(gb).__name__)} object has no attribute {repr(bl)}$)"
251+
f"(?:^'{type(gb).__name__}' object has no attribute {repr(bl)}$)"
252252
)
253253

254254
msg = f"{defined_but_not_allowed}|{not_defined}"

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

pandas/tests/indexes/multi/test_integrity.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,7 @@ def test_rangeindex_fallback_coercion_bug():
253253

254254
def test_hash_error(indices):
255255
index = indices
256-
with pytest.raises(
257-
TypeError, match=(f"unhashable type: {repr(type(index).__name__)}")
258-
):
256+
with pytest.raises(TypeError, match=f"unhashable type: '{type(index).__name__}'"):
259257
hash(indices)
260258

261259

pandas/tests/indexes/test_common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def test_set_name_methods(self, indices):
161161
def test_hash_error(self, indices):
162162
index = indices
163163
with pytest.raises(
164-
TypeError, match=(f"unhashable type: {repr(type(index).__name__)}")
164+
TypeError, match=f"unhashable type: '{type(index).__name__}'"
165165
):
166166
hash(indices)
167167

0 commit comments

Comments
 (0)