From 1ba75cab3138136b20da9b5c7401917b76d8eb5b Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Wed, 24 Aug 2016 17:52:52 -0400 Subject: [PATCH] Fix `map` between Py2/3 --- test/tasks/test_tradeking.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/tasks/test_tradeking.py b/test/tasks/test_tradeking.py index c6499c1..e126309 100644 --- a/test/tasks/test_tradeking.py +++ b/test/tasks/test_tradeking.py @@ -3,6 +3,7 @@ from datetime import datetime from pandas_datareader.data import get_data_yahoo from numpy.testing import assert_allclose import pytest +from six.moves import map from metrik.tasks.tradeking import Tradeking1mTimesales from metrik.trading_days import TradingDay @@ -18,9 +19,9 @@ def test_returns_verifiable(ticker): quotes = Tradeking1mTimesales.retrieve_data(prior_day, ticker) - yahoo_ohlc = map(tuple, get_data_yahoo(ticker, prior_day, prior_day)[ + yahoo_ohlc = list(map(tuple, get_data_yahoo(ticker, prior_day, prior_day)[ ['Open', 'High', 'Low', 'Close'] - ].values)[0] + ].values))[0] open = high = close = 0 low = 999999