#NEWLINE# def testgetPaddingNum( self ) : #NEWLINE# #INDENT# "\n        Ensure that we're getting back the proper padding number.\n        :return: None\n        " #NEWLINE# self . assertEqual ( getPaddingNum ( '@' ) , 1 ) #NEWLINE# self . assertEqual ( getPaddingNum ( '@@' ) , 2 ) #NEWLINE# self . assertEqual ( getPaddingNum ( '@@@' ) , 3 ) #NEWLINE# self . assertEqual ( getPaddingNum ( '#' ) , 4 ) #NEWLINE# self . assertEqual ( getPaddingNum ( '##' ) , 8 ) #NEWLINE# self . assertEqual ( getPaddingNum ( '#@' ) , 5 ) #NEWLINE# self . assertEqual ( getPaddingNum ( '##@@' ) , 10 ) #NEWLINE# allPossibleChars = [ s for s in string . printable if ( s not in PAD_MAP . keys ( ) ) ] #NEWLINE# for char in allPossibleChars : #NEWLINE# #INDENT# self . assertRaises ( ValueError , getPaddingNum , char ) #NEWLINE# self . assertRaises ( ValueError , getPaddingNum , '#{}' . format ( char ) ) #NEWLINE# self . assertRaises ( ValueError , getPaddingNum , '@{}' . format ( char ) )