<s> '''<STR_LIT>''' <EOL> import unittest <EOL> import random <EOL> from cola . core . bloomfilter import BloomFilter <EOL> class Test ( unittest . TestCase ) : <EOL> def get_random ( self ) : <EOL> size = random . randint ( <NUM_LIT:2> , <NUM_LIT:10> ) <EOL> return '<STR_LIT>' . join ( [ str ( random . randint ( <NUM_LIT:1> , <NUM_LIT:9> ) ) for _ in range ( size ) ] ) <EOL> def testBloomFilter ( self ) : <EOL> bf = BloomFilter ( capacity = <NUM_LIT> ) <EOL> self . assertFalse ( '<STR_LIT>' in bf ) <EOL> bf . add ( '<STR_LIT>' ) <EOL> self . assertTrue ( '<STR_LIT>' in bf ) <EOL> self . assertFalse ( '<STR_LIT>' in bf ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
