def test_count(self):
        sl = self.skiplist()
        self.assertEqual(sl.count(-2, 2), 0)
        sl.insert(1, 'bla')
        self.assertEqual(sl.count(-2, 2), 1)
        sl = self.random()
        self.assertEqual(sl.count(float('-inf'), float('+inf')), 100)
        n = 0
        for score, _ in sl:
            n += int(score >= -5 and score <= 5)
        self.assertEqual(sl.count(-5, 5), n)
        #
        # test exclusive
        sl = self.skiplist(((1, 'a1'), (2, 'a2'), (3, 'a3')))
        self.assertEqual(sl.count(1, 2), 2)
        self.assertEqual(sl.count(1, 2, include_min=False), 1)
        self.assertEqual(sl.count(1, 2, include_max=False), 1)
        self.assertEqual(sl.count(1, 2, include_min=False,
                                  include_max=False), 0)
dataset/ETHPy150Open quantmind/pulsar/tests/utils/structures/test_skiplist.py/TestSkiplist.test_count/original