<s> '''<STR_LIT>''' <EOL> import unittest <EOL> import tempfile <EOL> import os <EOL> from certfuzz . test import MockSeedfile <EOL> import shutil <EOL> from certfuzz . fuzzers . bitmut import BitMutFuzzer <EOL> class Test ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . sf = seedfile_obj = MockSeedfile ( ) <EOL> self . tempdir = tempfile . mkdtemp ( ) <EOL> self . outdir = outdir_base = tempfile . mkdtemp ( prefix = '<STR_LIT>' , <EOL> dir = self . tempdir ) <EOL> rng_seed = <NUM_LIT:0> <EOL> iteration = <NUM_LIT:0> <EOL> self . options = { } <EOL> self . args = ( seedfile_obj , outdir_base , rng_seed , iteration , self . options ) <EOL> def tearDown ( self ) : <EOL> shutil . rmtree ( self . tempdir ) <EOL> def _fail_if_not_fuzzed ( self , fuzzed ) : <EOL> for c in fuzzed : <EOL> if c != '<STR_LIT:A>' : <EOL> break <EOL> else : <EOL> self . fail ( '<STR_LIT>' ) <EOL> def test_is_minimizable ( self ) : <EOL> f = BitMutFuzzer ( * self . args ) <EOL> self . assertTrue ( f . is_minimizable ) <EOL> def test_fuzz ( self ) : <EOL> self . assertTrue ( self . sf . len > <NUM_LIT:0> ) <EOL> for i in xrange ( <NUM_LIT:100> ) : <EOL> with BitMutFuzzer ( * self . args ) as f : <EOL> f . iteration = i <EOL> f . _fuzz ( ) <EOL> self . assertEqual ( self . sf . len , len ( f . fuzzed ) ) <EOL> self . _fail_if_not_fuzzed ( f . fuzzed ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
