#NEWLINE# def test_create_file( self ) : #NEWLINE# #INDENT# 'Test the a simple XlsxWriter file with worksheet protection.' #NEWLINE# workbook = Workbook ( self . got_filename ) #NEWLINE# worksheet = workbook . add_worksheet ( ) #NEWLINE# unlocked = workbook . add_format ( { #NEWLINE# #INDENT# 'locked' : 0 , #NEWLINE# 'hidden' : 0 , #NEWLINE# #UNINDENT# } ) #NEWLINE# hidden = workbook . add_format ( { #NEWLINE# #INDENT# 'locked' : 0 , #NEWLINE# 'hidden' : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# worksheet . protect ( 'password' ) #NEWLINE# worksheet . write ( 'A1' , 1 ) #NEWLINE# worksheet . write ( 'A2' , 2 , unlocked ) #NEWLINE# worksheet . write ( 'A3' , 3 , hidden ) #NEWLINE# workbook . close ( ) #NEWLINE# self . assertExcelEqual ( )