TST: Fix get_last_traded_dt on bcolz daily reader.

Remove special handling for the last session of an asset, which was
moving the last traded back a session.

If the asset has data on a session, `get_last_traded_dt` should always
return that session if it is the parameter to the method.
This commit is contained in:
Eddie Hebert
2016-08-31 14:59:58 -04:00
parent 8863d007ce
commit 1bebad5b68
4 changed files with 56 additions and 39 deletions
-6
View File
@@ -11,8 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from unittest import skip
from collections import OrderedDict
from numbers import Real
@@ -666,10 +664,6 @@ class TestReindexSessionBars(WithBcolzEquityDailyBarReader,
def test_last_availabe_dt(self):
self.assertEqual(self.reader.last_available_dt, self.END_DATE)
@skip("This test revealed a bug in BcolzDailyBarReader.get_last_traded_dt."
" When requesting data on the last session of an asset, the date is "
"overriden by the previous day. When that errant handling is this "
"test should be enabled.")
def test_get_last_traded_dt(self):
asset = self.asset_finder.retrieve_asset(1)
self.assertEqual(self.reader.get_last_traded_dt(asset,