diff --git a/tests/test_finance.py b/tests/test_finance.py index 9a63815b..3a810f88 100644 --- a/tests/test_finance.py +++ b/tests/test_finance.py @@ -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 diff --git a/tests/test_perf_tracking.py b/tests/test_perf_tracking.py index 31c37dff..678f71f9 100644 --- a/tests/test_perf_tracking.py +++ b/tests/test_perf_tracking.py @@ -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( diff --git a/zipline/data/treasuries_can.py b/zipline/data/treasuries_can.py index 06f608a1..6d579aa2 100644 --- a/zipline/data/treasuries_can.py +++ b/zipline/data/treasuries_can.py @@ -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 diff --git a/zipline/finance/trading.py b/zipline/finance/trading.py index e367be15..f0d1389d 100644 --- a/zipline/finance/trading.py +++ b/zipline/finance/trading.py @@ -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