|
1 | 1 | import numpy as np
|
2 | 2 | import pytest
|
3 | 3 |
|
4 |
| -from pandas import DataFrame, Series |
| 4 | +from pandas import CategoricalDtype, DataFrame, NaT, Series, Timestamp |
5 | 5 | import pandas._testing as tm
|
6 | 6 |
|
7 | 7 |
|
@@ -93,6 +93,16 @@ def test_update_from_non_series(self, series, other, expected):
|
93 | 93 | Series([None, False], dtype="boolean"),
|
94 | 94 | Series([True, False], dtype="boolean"),
|
95 | 95 | ),
|
| 96 | + ( |
| 97 | + Series(["a", None], dtype=CategoricalDtype(categories=["a", "b"])), |
| 98 | + Series([None, "b"], dtype=CategoricalDtype(categories=["a", "b"])), |
| 99 | + Series(["a", "b"], dtype=CategoricalDtype(categories=["a", "b"])), |
| 100 | + ), |
| 101 | + ( |
| 102 | + Series([Timestamp(year=2020, month=1, day=1, tz="Europe/London"), NaT]), |
| 103 | + Series([NaT, Timestamp(year=2020, month=1, day=1, tz="Europe/London")]), |
| 104 | + Series([Timestamp(year=2020, month=1, day=1, tz="Europe/London")] * 2), |
| 105 | + ), |
96 | 106 | ],
|
97 | 107 | )
|
98 | 108 | def test_update_extension_array_series(self, result, target, expected):
|
|
0 commit comments