Skip to content

Commit ebf45b2

Browse files
TST/CLN: Follow-up to pandas-dev#31867
1 parent edcf1c8 commit ebf45b2

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

pandas/tests/indexing/test_floats.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -190,16 +190,12 @@ def test_scalar_with_mixed(self):
190190
s2 = Series([1, 2, 3], index=["a", "b", "c"])
191191
s3 = Series([1, 2, 3], index=["a", "b", 1.5])
192192

193-
# lookup in a pure stringstr
194-
# with an invalid indexer
195-
msg = (
196-
r"cannot do label indexing "
197-
r"on Index with these indexers \[1\.0\] of "
198-
r"type float|"
199-
"Cannot index by location index with a non-integer key"
200-
)
193+
# lookup in a pure string index with an invalid indexer
194+
201195
with pytest.raises(KeyError, match="^1.0$"):
202196
s2[1.0]
197+
198+
msg = "Cannot index by location index with a non-integer key"
203199
with pytest.raises(TypeError, match=msg):
204200
s2.iloc[1.0]
205201

0 commit comments

Comments
 (0)