mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-10 11:50:32 +08:00
MAINT: use column's missing value.
STY: fix flake8 failures. MAINT: fixes for compatibility with py2. MAINT: fix import error. MAINT: use dict.items() for compatibility with py3.
This commit is contained in:
@@ -119,7 +119,7 @@ def zip_with_dates(index_dates, dts):
|
||||
return pd.Series(pd.to_datetime(dts), index=index_dates)
|
||||
|
||||
|
||||
class BuybackAuthLoaderCommonTest:
|
||||
class BuybackAuthLoaderCommonTest(object):
|
||||
"""
|
||||
Tests for loading the buyback authorization announcement data.
|
||||
"""
|
||||
@@ -294,8 +294,8 @@ class CashBuybackAuthLoaderTestCase(TestCase, BuybackAuthLoaderCommonTest):
|
||||
# until 15?
|
||||
A: zip_with_floats_dates(
|
||||
['NaN'] * num_days_between(dates, None, '2014-01-14') +
|
||||
[10] * num_days_between_dates('2014-01-15', '2014-01-19') +
|
||||
[20] * num_days_between_dates('2014-01-20', None)
|
||||
[10] * num_days_between_dates('2014-01-15', '2014-01-19') +
|
||||
[20] * num_days_between_dates('2014-01-20', None)
|
||||
),
|
||||
B: zip_with_floats_dates(
|
||||
['NaN'] * num_days_between_dates(None, '2014-01-14') +
|
||||
|
||||
@@ -393,9 +393,11 @@ class EarningsCalendarLoaderInferTimestampTestCase(TestCase):
|
||||
)
|
||||
assert_series_equal(
|
||||
loader.events_by_sid[1].loc[:, ANNOUNCEMENT_FIELD_NAME],
|
||||
pd.Series(index=announcement_dates[1].loc[:, TS_FIELD_NAME],
|
||||
data=np.array(
|
||||
announcement_dates[1].loc[:, ANNOUNCEMENT_FIELD_NAME]
|
||||
),
|
||||
name=ANNOUNCEMENT_FIELD_NAME)
|
||||
pd.Series(
|
||||
index=announcement_dates[1].loc[:, TS_FIELD_NAME],
|
||||
data=np.array(
|
||||
announcement_dates[1].loc[:, ANNOUNCEMENT_FIELD_NAME]
|
||||
),
|
||||
name=ANNOUNCEMENT_FIELD_NAME
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user