Skip to content

Commit

Permalink
TEST: added test case for issue 41800 (pandas-dev#50677)
Browse files Browse the repository at this point in the history
* TEST: added test case for issue 41800

addresses pandas-dev#41800

* fix lint error

* fix lint error

* added assert_series_equal control and changed date_range call
  • Loading branch information
lpizzinidev authored and phofl committed Jan 12, 2023
1 parent 9a908b0 commit e95a46a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pandas/tests/series/methods/test_combine_first.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,16 @@ def test_combine_first_dt_tz_values(self, tz_naive_fixture):
)
exp = Series(exp_vals, name="ser1")
tm.assert_series_equal(exp, result)

def test_combine_first_timezone_series_with_empty_series(self):
# GH 41800
time_index = date_range(
datetime(2021, 1, 1, 1),
datetime(2021, 1, 1, 10),
freq="H",
tz="Europe/Rome",
)
s1 = Series(range(10), index=time_index)
s2 = Series(index=time_index)
result = s1.combine_first(s2)
tm.assert_series_equal(result, s1)

0 comments on commit e95a46a

Please sign in to comment.