mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-11 12:00:50 +08:00
TST: Use Timestamp instead of Delorean for trading calendar test.
Removes another use of Delorean in favor of Timestamp 'today'.
This commit is contained in:
@@ -19,16 +19,16 @@ from zipline.utils import tradingcalendar_lse
|
|||||||
import pytz
|
import pytz
|
||||||
import datetime
|
import datetime
|
||||||
from zipline.finance.trading import TradingEnvironment
|
from zipline.finance.trading import TradingEnvironment
|
||||||
|
import pandas as pd
|
||||||
from pandas import DatetimeIndex
|
from pandas import DatetimeIndex
|
||||||
from delorean import Delorean
|
|
||||||
from nose.tools import nottest
|
from nose.tools import nottest
|
||||||
|
|
||||||
|
|
||||||
class TestTradingCalendar(TestCase):
|
class TestTradingCalendar(TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
today = Delorean().truncate('day')
|
today = pd.Timestamp('today', tz='UTC')
|
||||||
self.end = DatetimeIndex([today.datetime])
|
self.end = DatetimeIndex([today])
|
||||||
|
|
||||||
@nottest
|
@nottest
|
||||||
def test_calendar_vs_environment(self):
|
def test_calendar_vs_environment(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user