#NEWLINE# @ pytest . mark . parametrize ( 'mode' , [ op2 . READ , op2 . RW , op2 . MAX , op2 . MIN ] ) #NEWLINE# def test_invalid_mode( self , backend , elements , elem_node , mat , mode ) : #NEWLINE# #INDENT# 'Mat args can only have modes WRITE and INC.' #NEWLINE# with pytest . raises ( ModeValueError ) : #NEWLINE# #INDENT# op2 . par_loop ( op2 . Kernel ( '' , 'dummy' ) , elements , mat ( mode , ( elem_node [ op2 . i [ 0 ] ] , mat [ op2 . i [ 1 ] ] ) ) )