#NEWLINE# def test_multiple_required( runner ) : #NEWLINE# #INDENT# @ click . command ( ) #NEWLINE# @ click . option ( '-m' , '--message' , multiple = True , required = True ) #NEWLINE# def cli( message ) : #NEWLINE# #INDENT# click . echo ( '\n' . join ( message ) ) #NEWLINE# #UNINDENT# result = runner . invoke ( cli , [ '-m' , 'foo' , '-mbar' ] ) #NEWLINE# assert ( not result . exception ) #NEWLINE# assert ( result . output == 'foo\nbar\n' ) #NEWLINE# result = runner . invoke ( cli , [ ] ) #NEWLINE# assert result . exception #NEWLINE# assert ( 'Error: Missing option "-m" / "--message".' in result . output )