Beispiel #1
0
	def test_pop(self):
		rb = RoaringBitmap([60748, 28806, 54664, 28597, 58922, 75684, 56364,
			67421, 52608, 55686, 10427, 48506, 64363, 14506, 73077, 59035,
			70246, 19875, 73145, 40225, 58664, 6597, 65554, 73102, 26636,
			74227, 59566, 19023])
		while rb:
			rb.pop()
		rb._checkconsistency()
		assert len(rb) == 0
Beispiel #2
0
 def test_pop(self):
     rb = RoaringBitmap([
         60748, 28806, 54664, 28597, 58922, 75684, 56364, 67421, 52608,
         55686, 10427, 48506, 64363, 14506, 73077, 59035, 70246, 19875,
         73145, 40225, 58664, 6597, 65554, 73102, 26636, 74227, 59566, 19023
     ])
     while rb:
         rb.pop()
     rb._checkconsistency()
     assert len(rb) == 0
Beispiel #3
0
    def test_issue24(self):
        r = RoaringBitmap(range(131071))
        assert r.pop() == 131070
        assert r.pop() == 131069

        rr = r - RoaringBitmap([130752])
        assert 130752 not in rr
        assert rr.pop() == 131068

        r.difference_update(RoaringBitmap([130752]))
        assert 130752 not in r
        assert r.pop() == 131068