Skip to content

Commit fe3514a

Browse files
committed
remove unnecessary test, rename a variable
1 parent c333613 commit fe3514a

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

pandas/tests/groupby/test_groupby.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2996,15 +2996,3 @@ def test_groupby_multi_index_codes():
29962996

29972997
index = df_grouped.index
29982998
tm.assert_index_equal(index, MultiIndex.from_frame(index.to_frame()))
2999-
3000-
3001-
def test_groupby_keys_1length_list():
3002-
# GH#58858
3003-
msg = "`groups` by one element list returns scalar is deprecated"
3004-
3005-
df = DataFrame({"x": [10, 20, 30], "y": ["a", "b", "c"]})
3006-
expected = {10: [0], 20: [1], 30: [2]}
3007-
with tm.assert_produces_warning(FutureWarning, match=msg):
3008-
result = df.groupby(["x"]).groups
3009-
tm.assert_dict_equal(result, expected)
3010-
print(result, type(result))

pandas/tests/groupby/test_grouping.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,10 +739,10 @@ def test_list_grouper_with_nat(self):
739739
msg = "`groups` by one element list returns scalar is deprecated"
740740

741741
# Grouper in a list grouping
742-
result = df.groupby([grouper])
742+
gb = df.groupby([grouper])
743743
expected = {Timestamp("2011-01-01"): Index(list(range(364)))}
744744
with tm.assert_produces_warning(FutureWarning, match=msg):
745-
result = result.groups
745+
result = gb.groups
746746
tm.assert_dict_equal(result, expected)
747747

748748
# Test case without a list

0 commit comments

Comments
 (0)