#NEWLINE# def test_RaiseException( setup_sim ) : #NEWLINE# #INDENT# model = RaiseException ( ) #NEWLINE# ( model , sim ) = setup_sim ( sim ) #NEWLINE# model . in_ . value = 0 #NEWLINE# sim . cycle ( ) #NEWLINE# assert ( model . out == 0 ) #NEWLINE# model . in_ . value = 1 #NEWLINE# sim . cycle ( ) #NEWLINE# assert ( model . out == 1 ) #NEWLINE# model . in_ . value = 2 #NEWLINE# sim . cycle ( ) #NEWLINE# assert ( model . out == 2 ) #NEWLINE# with pytest . raises ( Exception ) : #NEWLINE# #INDENT# model . in_ . value = 3 #NEWLINE# sim . cycle ( )