#NEWLINE# def testInstanceCantBeTerminated( self ) : #NEWLINE# #INDENT# self . _write_config ( '\n' . join ( [ '[plain-instance:foo]' ] ) ) #NEWLINE# with patch ( 'sys.stderr' ) as StdErrMock : #NEWLINE# #INDENT# with pytest . raises ( SystemExit ) : #NEWLINE# #INDENT# self . ctrl ( [ './bin/ploy' , 'stop' , 'foo' ] ) #NEWLINE# #UNINDENT# #UNINDENT# output = '' . join ( ( x [ 0 ] [ 0 ] for x in x . write . call_args_list ) ) #NEWLINE# assert ( "invalid choice: 'foo'" in output )