#NEWLINE# def test_map_write_invalid2( ) : #NEWLINE# #INDENT# v = virtual_file ( ) #NEWLINE# s = MapSource ( ) #NEWLINE# s . luminosity = 1.0 #NEWLINE# s . map = np . zeros ( ( 2 , 3 , 4 ) ) #NEWLINE# with pytest . raises ( Exception ) as exc : #NEWLINE# #INDENT# s . write ( v , 'test' , None ) #NEWLINE# #UNINDENT# assert ( exc . value . args [ 0 ] == 'map is zero everywhere' )