def test_remove_not_inserted(): v = VICBF(10000, 3) try: v.remove(124) except ValueError: assert True return assert False
def test_remove_none(): v = VICBF(10000, 3) try: v.remove(None) except ValueError: assert True return assert False
def test_insert_overflow(): v = VICBF(10000, 3) for i in range(1000): v.insert(123) assert v.query(123) for i in range(1000): v.remove(123) # Even though it should now theoretically be removed, the implementation # should still return true because the values should have been fixed at # the maximum when the overflow occured assert v.query(123)
def test_query_multi_insert_remove(): v = VICBF(10000, 3) v.insert(123) v.insert(123) v.remove(123) assert v.query(123)
def test_remove(): v = VICBF(10000, 3) v.insert(123) v.remove(123) assert not v.query(123)