<s> '''<STR_LIT>''' <EOL> import unittest <EOL> import certfuzz . helpers as helpers <EOL> import platform <EOL> import string <EOL> import itertools <EOL> class Test ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> pass <EOL> def tearDown ( self ) : <EOL> pass <EOL> def test_quoted ( self ) : <EOL> for s in list ( '<STR_LIT>' ) : <EOL> self . assertTrue ( s in helpers . quoted ( s ) ) <EOL> self . assertEqual ( '<STR_LIT:">' + s + '<STR_LIT:">' , helpers . quoted ( s ) ) <EOL> def test_check_os_compatibility ( self ) : <EOL> for expected in list ( '<STR_LIT>' ) : <EOL> self . assertRaises ( ImportError , helpers . check_os_compatibility , expected ) <EOL> my_sys = platform . system ( ) <EOL> try : <EOL> helpers . check_os_compatibility ( my_sys ) <EOL> except : <EOL> self . fail ( '<STR_LIT>' % my_sys ) <EOL> def test_random_str ( self ) : <EOL> self . assertEqual ( <NUM_LIT:1> , len ( helpers . random_str ( ) ) ) <EOL> random_string = helpers . random_str ( <NUM_LIT:100> ) <EOL> self . assertEqual ( <NUM_LIT:100> , len ( random_string ) ) <EOL> for c in random_string : <EOL> chars = string . ascii_letters + string . digits <EOL> self . assertTrue ( c in chars ) <EOL> def test_bitswap ( self ) : <EOL> for x , y in itertools . izip ( [ <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:4> ] , [ <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:64> , <NUM_LIT> , <NUM_LIT:32> ] ) : <EOL> self . assertEqual ( y , helpers . bitswap ( x ) ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
