def test_count_timerange(self):
        self.assertEqual(self.tik.count_timerange(), len(self.items))

        start_ts, end_ts = self.items[1][2], self.items[4][2]
        count = self.tik.count_timerange(start_ts, end_ts)
        self.assertEqual(count, 4)

        count = self.tik.count_timerange(start_ts)
        self.assertEqual(count, len(self.items) - 1)
dataset/ETHPy150Open caxap/redis-moment/moment/tests.py/TimeIndexedKeyTestCase.test_count_timerange/original