Repository: pandas-dev/pandas
File: pandas/tests/series/methods/test_round.py (Python)

Code before:
        round_method = getattr(ser.dt, method)
        result = round_method(freq)
        tm.assert_series_equal(result, expected)

    def test_round_ea_boolean(self):
        ser = Series([True, False], dtype="boolean")
        expected = ser.copy()
        result = ser.round(2)
        tm.assert_series_equal(result, expected)
        result.iloc[0] = False
        tm.assert_series_equal(ser, expected)


class TestRound:
    @pytest.mark.parametrize(
        "data,decimals,expected_data",
        [
            ([0.2], 0, [0.0]),
            ([1.234, 2.567], 1, [1.2, 2.6]),
            ([1.234, 2.567], 2, [1.23, 2.57]),
            ([1.234, 2.567], 0, [1.0, 3.0]),
        ],
    )
    def test_round_dtype_object(self, data, decimals, expected_data):
        """Test round() with object dtype Series."""
        ser = Series(data, dtype="object")
        result = ser.round(decimals)
        expected = Series(expected_data, dtype="object")
        tm.assert_series_equal(result, expected)

    @pytest.mark.parametrize(
        "dtype",
        [
            None,
            "float64",
            "int64",
        ],
    )
    def test_round_empty_series(self, dtype):
        """Test that round works on empty Series."""
        result = Series(dtype=dtype).round(4)
        expected = Series(dtype=dtype)
        tm.assert_series_equal(result, expected)

    @pytest.mark.parametrize(
        "dtype",
        [
            "float32",
            "float64",
        ],
    )

Review comment (suggestion):
For all added tests, can you add a reference to the issue as a comment on the first line.

```
# GH#63444
```

Code after:
        expected = Series(pd.NaT, dtype=f"M8[{unit}]")
        round_method = getattr(ser.dt, method)
        result = round_method(freq)
        tm.assert_series_equal(result, expected)

    def test_round_ea_boolean(self):
        # GH#55936
        ser = Series([True, False], dtype="boolean")
        expected = ser.copy()
        result = ser.round(2)
        tm.assert_series_equal(result, expected)
        result.iloc[0] = False
        tm.assert_series_equal(ser, expected)

    @pytest.mark.parametrize(
        "data,decimals,expected_data",
        [
            ([0.2], 0, [0.0]),
            ([1.234, 2.567], 1, [1.2, 2.6]),
            ([1.234, 2.567], 2, [1.23, 2.57]),
            ([1.234, 2.567], 0, [1.0, 3.0]),
        ],
    )
    def test_round_dtype_object(self, data, decimals, expected_data):
        # GH#63444
        ser = Series(data, dtype="object")
        result = ser.round(decimals)
        expected = Series(expected_data, dtype="object")
        tm.assert_series_equal(result, expected)

    @pytest.mark.parametrize(
        "dtype",
        [
            None,
            "float64",
            "int64",
            "object",
        ],
    )
    def test_round_empty_series(self, dtype):
        # GH#63444
        result = Series(dtype=dtype).round(4)
        expected = Series(dtype=dtype)
        tm.assert_series_equal(result, expected)

    @pytest.mark.parametrize(
        "dtype,data",
        [
            ("string", ["a", "b", "c"]),
            ("category", ["cat1", "cat2", "cat3"]),
            (pd.StringDtype(), ["x", "y", "z"]),