Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion pandas/tests/series/methods/test_update.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
import pytest

from pandas import DataFrame, Series
from pandas import CategoricalDtype, DataFrame, NaT, Series, Timestamp
import pandas._testing as tm


Expand Down Expand Up @@ -93,6 +93,16 @@ def test_update_from_non_series(self, series, other, expected):
Series([None, False], dtype="boolean"),
Series([True, False], dtype="boolean"),
),
(
Series(["a", None], dtype=CategoricalDtype(categories=["a", "b"])),
Series([None, "b"], dtype=CategoricalDtype(categories=["a", "b"])),
Series(["a", "b"], dtype=CategoricalDtype(categories=["a", "b"])),
),
(
Series([Timestamp(year=2020, month=1, day=1, tz="Europe/London"), NaT]),
Series([NaT, Timestamp(year=2020, month=1, day=1, tz="Europe/London")]),
Series([Timestamp(year=2020, month=1, day=1, tz="Europe/London")] * 2),
),
],
)
def test_update_extension_array_series(self, result, target, expected):
Expand Down