Skip to content

TST: Remaining tseries tests reorg (gh14854) #15359

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 13 additions & 1 deletion pandas/tests/indexes/datetimes/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
import pandas.util.testing as tm
from pandas.core.common import PerformanceWarning
from pandas.tseries.index import cdate_range
from pandas.tseries.frequencies import get_offset, to_offset
from pandas import (DatetimeIndex, PeriodIndex, Series, Timestamp, Timedelta,
date_range, TimedeltaIndex, _np_version_under1p10, Index,
datetime, Float64Index, offsets, bdate_range)
from pandas.tseries.offsets import BMonthEnd, CDay, BDay
from pandas.tseries.offsets import (BMonthEnd, CDay, BDay, Milli, MonthBegin,
Micro)
from pandas.tests.test_base import Ops


Expand Down Expand Up @@ -911,6 +913,16 @@ def test_equals(self):
self.assertFalse(idx.equals(list(idx3)))
self.assertFalse(idx.equals(pd.Series(idx3)))

def test_ms_vs_MS(self):
left = get_offset('ms')
right = get_offset('MS')
self.assertEqual(left, Milli())
self.assertEqual(right, MonthBegin())

def test_rule_aliases(self):
rule = to_offset('10us')
self.assertEqual(rule, Micro(10))


class TestDateTimeIndexToJulianDate(tm.TestCase):

Expand Down
10 changes: 9 additions & 1 deletion pandas/tests/indexes/datetimes/test_setops.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pandas.util.testing as tm
from pandas.tseries.index import cdate_range
from pandas import (DatetimeIndex, date_range, Series, bdate_range, DataFrame,
Int64Index, Index)
Int64Index, Index, to_datetime)
from pandas.tseries.offsets import Minute, BMonthEnd, MonthEnd

START, END = datetime(2009, 1, 1), datetime(2010, 1, 1)
Expand Down Expand Up @@ -190,6 +190,14 @@ def test_datetimeindex_union_join_empty(self):
result = dti.join(empty)
tm.assertIsInstance(result, DatetimeIndex)

def test_join_nonunique(self):
idx1 = to_datetime(['2012-11-06 16:00:11.477563',
'2012-11-06 16:00:11.477563'])
idx2 = to_datetime(['2012-11-06 15:11:09.006507',
'2012-11-06 15:11:09.006507'])
rs = idx1.join(idx2, how='outer')
self.assertTrue(rs.is_monotonic)


class TestBusinessDatetimeIndex(tm.TestCase):

Expand Down
File renamed without changes.
Binary file removed pandas/tseries/tests/data/daterange_073.pickle
Binary file not shown.
Binary file removed pandas/tseries/tests/data/frame.pickle
Binary file not shown.
Binary file removed pandas/tseries/tests/data/series.pickle
Binary file not shown.
Binary file removed pandas/tseries/tests/data/series_daterange0.pickle
Binary file not shown.
219 changes: 0 additions & 219 deletions pandas/tseries/tests/test_timeseries_legacy.py

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,13 +648,13 @@ def pxd(name):
'pandas.tests.series',
'pandas.tests.formats',
'pandas.tests.scalar',
'pandas.tests.tseries',
'pandas.tests.types',
'pandas.tests.test_msgpack',
'pandas.tests.plotting',
'pandas.tools',
'pandas.tools.tests',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also need to make a change in package_data to move the actual data files

'pandas.tseries',
'pandas.tseries.tests',
'pandas.types',
'pandas.io.tests',
'pandas.io.tests.json',
Expand Down