Skip to content

TST: Move datetime specific test from common tests #28801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 5, 2019
Merged
Show file tree
Hide file tree
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
8 changes: 0 additions & 8 deletions pandas/tests/indexes/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,6 @@ def test_to_frame(self, name):
df = idx.to_frame(index=False, name=idx_name)
assert df.index is not idx

def test_to_frame_datetime_tz(self):
# GH 25809
idx = pd.date_range(start="2019-01-01", end="2019-01-30", freq="D")
idx = idx.tz_localize("UTC")
result = idx.to_frame()
expected = pd.DataFrame(idx, index=idx)
tm.assert_frame_equal(result, expected)

def test_shift(self):

# GH8083 test the base class for shift
Expand Down
7 changes: 7 additions & 0 deletions pandas/tests/indexes/datetimes/test_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,3 +450,10 @@ def test_asarray_tz_aware(self):
result = np.asarray(idx, dtype=object)

tm.assert_numpy_array_equal(result, expected)

def test_to_frame_datetime_tz(self):
# GH 25809
idx = date_range(start="2019-01-01", end="2019-01-30", freq="D", tz="UTC")
result = idx.to_frame()
expected = DataFrame(idx, index=idx)
tm.assert_frame_equal(result, expected)