STY: pep8 fixes.

This commit is contained in:
twiecki
2014-04-10 09:32:34 -04:00
parent ec136c265e
commit 5cb2919b10
4 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -325,9 +325,9 @@ class FinanceTestCase(TestCase):
# move after market orders to just after market next
# market open.
if order_date.hour >= 21:
if order_date.minute >= 00:
order_date = order_date + timedelta(days=1)
order_date = order_date.replace(hour=14, minute=30)
if order_date.minute >= 00:
order_date = order_date + timedelta(days=1)
order_date = order_date.replace(hour=14, minute=30)
# there should now be one open order list stored under the sid
oo = blotter.open_orders
+2 -2
View File
@@ -654,8 +654,8 @@ class TestPositionPerformance(unittest.TestCase):
trades[-1]['price'],
"last sale should be same as last trade. \
expected {exp} actual {act}".format(
exp=trades[-1]['price'],
act=pp.positions[1].last_sale_price)
exp=trades[-1]['price'],
act=pp.positions[1].last_sale_price)
)
self.assertEqual(
+1 -1
View File
@@ -48,7 +48,7 @@ def get_treasury_source(start_date=None, end_date=None):
today = datetime.date.today()
# Bank of Canada only has 10 years of data and has this in the URL.
restriction = datetime.date(today.year-10, today.month, today.day)
restriction = datetime.date(today.year - 10, today.month, today.day)
if not end_date:
end_date = today
+1 -1
View File
@@ -52,7 +52,7 @@ log = logbook.Logger('Trading')
# you can use a TradingEnvironment in a with clause:
# lse = TradingEnvironment(bm_index="^FTSE", exchange_tz="Europe/London")
# with lse:
# # the code here will have lse as the global trading.environment
# the code here will have lse as the global trading.environment
# algo.run(start, end)
#
# User code will not normally need to use TradingEnvironment