Skip to content

Commit def894c

Browse files
authored
TST: add missing loc label indexing test (#38880)
1 parent f6cc88d commit def894c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pandas/tests/indexing/test_loc.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ def test_loc_getitem_label_out_of_range(self):
5656
self.check_result("loc", 20, typs=["floats"], axes=0, fails=KeyError)
5757

5858
def test_loc_getitem_label_list(self):
59-
# TODO: test something here?
6059
# list of labels
61-
pass
60+
self.check_result(
61+
"loc", [0, 1, 2], typs=["ints", "uints", "floats"], fails=KeyError
62+
)
63+
self.check_result(
64+
"loc", [1, 3.0, "A"], typs=["ints", "uints", "floats"], fails=KeyError
65+
)
6266

6367
def test_loc_getitem_label_list_with_missing(self):
6468
self.check_result("loc", [0, 1, 2], typs=["empty"], fails=KeyError)

0 commit comments

Comments
 (0)