MAINT: Removes use of partials in schedule classes

This commit is contained in:
jfkirk
2016-06-08 13:34:19 -04:00
committed by Jean Bredeche
parent ddaf3d5b02
commit 705fb4e89f
6 changed files with 101 additions and 66 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ class ExchangeCalendarTestBase(object):
def test_minute_window(self):
for open in self.answers.market_open:
open_tz = open.tz_localize('UTC')
window = self.calendar.market_minute_window(open_tz, 390, step=1)
window = self.calendar.trading_minute_window(open_tz, 390, step=1)
self.assertEqual(len(window), 390)
+4 -4
View File
@@ -497,7 +497,7 @@ class TradingEnvironmentTestCase(WithLogger,
utc_start = pd.Timestamp(start.astimezone(utc))
# Get the next 10 minutes
minutes = self.cal.market_minute_window(
minutes = self.cal.trading_minute_window(
utc_start, 10,
)
self.assertEqual(len(minutes), 10)
@@ -505,7 +505,7 @@ class TradingEnvironmentTestCase(WithLogger,
self.assertEqual(minutes[i], utc_start + timedelta(minutes=i))
# Get the previous 10 minutes.
minutes = self.cal.market_minute_window(
minutes = self.cal.trading_minute_window(
utc_start, 10, step=-1,
)
self.assertEqual(len(minutes), 10)
@@ -518,7 +518,7 @@ class TradingEnvironmentTestCase(WithLogger,
# Today: 10:01 AM -> 4:00 PM (360 minutes)
# Tomorrow: 9:31 AM -> 4:00 PM (390 minutes, 750 total)
# Last Day: 9:31 AM -> 12:00 PM (150 minutes, 900 total)
minutes = self.cal.market_minute_window(
minutes = self.cal.trading_minute_window(
start, 900,
)
today = self.cal.trading_minutes_for_day(utc_start)[30:]
@@ -540,7 +540,7 @@ class TradingEnvironmentTestCase(WithLogger,
# Today: 10:01 AM -> 9:31 AM (31 minutes)
# Friday: 4:00 PM -> 9:31 AM (390 minutes, 421 total)
# Thursday: 4:00 PM -> 9:41 AM (380 minutes, 801 total)
minutes = self.cal.market_minute_window(
minutes = self.cal.trading_minute_window(
start, 801, step=-1,
)