'Test writing empty data.'

def test_pad_data(self):

    sid = 1
    last_date = self.writer.last_date_in_output_for_sid(sid)
    self.assertIs(last_date, NaT)
    self.writer.pad(sid, TEST_CALENDAR_START)
    last_date = self.writer.last_date_in_output_for_sid(sid)
    self.assertEqual(last_date, TEST_CALENDAR_START)
    freq = self.market_opens.index.freq
    day = (TEST_CALENDAR_START + freq)
    minute = self.market_opens[day]
    data = DataFrame(data={'open': [15.0], 'high': [17.0], 'low': [11.0], 'close': [15.0], 'volume': [100.0]}, index=[minute])
    self.writer.write_sid(sid, data)
    open_price = self.reader.get_value(sid, minute, 'open')
    self.assertEquals(15.0, open_price)
    high_price = self.reader.get_value(sid, minute, 'high')
    self.assertEquals(17.0, high_price)
    low_price = self.reader.get_value(sid, minute, 'low')
    self.assertEquals(11.0, low_price)
    close_price = self.reader.get_value(sid, minute, 'close')
    self.assertEquals(15.0, close_price)
    volume_price = self.reader.get_value(sid, minute, 'volume')
    self.assertEquals(100.0, volume_price)
    self.writer.pad(sid, day)
    self.assertEqual(len(self.writer._ensure_ctable(sid)), (self.writer._minutes_per_day * 2))
