'Test writing empty data.'

def test_nans(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
    minute = self.market_opens[(TEST_CALENDAR_START + freq)]
    minutes = date_range(minute, periods=9, freq='min')
    data = DataFrame(data={'open': full(9, nan), 'high': full(9, nan), 'low': full(9, nan), 'close': full(9, nan), 'volume': full(9, 0.0)}, index=[minutes])
    self.writer.write_sid(sid, data)
    fields = ['open', 'high', 'low', 'close', 'volume']
    ohlcv_window = list(map(transpose, self.reader.load_raw_arrays(fields, minutes[0], minutes[(-1)], [sid])))
    for (i, field) in enumerate(fields):
        if (field != 'volume'):
            assert_array_equal(full(9, nan), ohlcv_window[i][0])
        else:
            assert_array_equal(zeros(9), ohlcv_window[i][0])
