Skip to content

Commit fb548ad

Browse files
author
Kei
committed
Update tests according to pr comments
1 parent 5311004 commit fb548ad

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/tests/groupby/transform/test_transform.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,6 +1537,7 @@ def test_transform_sum_one_column_with_matching_labels_and_missing_labels():
15371537
tm.assert_frame_equal(result, expected)
15381538

15391539

1540+
# GH#58084
15401541
def test_min_one_unobserved_category_no_type_coercion():
15411542
df = DataFrame({"A": Categorical([1, 1, 2], categories=[1, 2, 3]), "B": [3, 4, 5]})
15421543
df["B"] = df["B"].astype("int32")
@@ -1545,9 +1546,9 @@ def test_min_one_unobserved_category_no_type_coercion():
15451546

15461547
expected = DataFrame({"B": [3, 3, 5]}, dtype="int32")
15471548
tm.assert_frame_equal(expected, result)
1548-
assert df["B"].dtype == result["B"].dtype
15491549

15501550

1551+
# GH#58084
15511552
def test_min_multiple_unobserved_categories_no_type_coercion():
15521553
df = DataFrame(
15531554
{
@@ -1588,9 +1589,9 @@ def test_min_multiple_unobserved_categories_no_type_coercion():
15881589
dtype="int64",
15891590
)
15901591
tm.assert_frame_equal(expected, result)
1591-
assert df["Y"].dtype == result["Y"].dtype
15921592

15931593

1594+
# GH#58084
15941595
def test_min_float32_multiple_unobserved_categories_no_type_coercion():
15951596
df = DataFrame(
15961597
{
@@ -1638,9 +1639,9 @@ def test_min_float32_multiple_unobserved_categories_no_type_coercion():
16381639
dtype="float32",
16391640
)
16401641
tm.assert_frame_equal(expected, result)
1641-
assert df["Y"].dtype == result["Y"].dtype
16421642

16431643

1644+
# GH#58084
16441645
def test_min_all_empty_data_no_type_coercion():
16451646
df = DataFrame(
16461647
{
@@ -1669,9 +1670,9 @@ def test_min_all_empty_data_no_type_coercion():
16691670

16701671
expected = DataFrame({"Y": []}, dtype="int32")
16711672
tm.assert_frame_equal(expected, result)
1672-
assert df["Y"].dtype == result["Y"].dtype
16731673

16741674

1675+
# GH#58084
16751676
def test_min_one_dim_no_type_coercion():
16761677
df = DataFrame({"Y": [9435, -5465765, 5055, 0, 954960]})
16771678
df["Y"] = df["Y"].astype("int32")
@@ -1682,4 +1683,3 @@ def test_min_one_dim_no_type_coercion():
16821683

16831684
expected = DataFrame({"Y": [9435, -5465765, -5465765, 0, 9435]}, dtype="int32")
16841685
tm.assert_frame_equal(expected, result)
1685-
assert df["Y"].dtype == result["Y"].dtype

0 commit comments

Comments
 (0)