#NEWLINE# @ patch ( 'rerun.rerun.sys.argv' , [ 1 , 2 , 3 ] ) #NEWLINE# @ patch ( 'rerun.rerun.get_parser' ) #NEWLINE# @ patch ( 'rerun.rerun.parse_args' ) #NEWLINE# @ patch ( 'rerun.rerun.validate' ) #NEWLINE# @ patch ( 'rerun.rerun.mainloop' ) #NEWLINE# @ patch ( 'rerun.rerun.signal.signal' ) #NEWLINE# def test_main( self , mock_signal , mock_mainloop , mock_validate , mock_parse_args , mock_get_parser ) : #NEWLINE# #INDENT# main ( ) #NEWLINE# self . assertEqual ( mock_signal . call_args , call ( signal . SIGTTOU , signal . SIG_IGN ) ) #NEWLINE# self . assertEqual ( mock_get_parser . call_args , ( ( 'rerun' , SKIP_DIRS , SKIP_EXT ) , ) ) #NEWLINE# self . assertEqual ( mock_parse_args . call_args , ( ( mock_get_parser . return_value , [ 2 , 3 ] ) , ) ) #NEWLINE# self . assertEqual ( mock_validate . call_args , ( ( mock_parse_args . return_value , ) , ) ) #NEWLINE# self . assertEqual ( mock_mainloop . call_args , ( ( mock_validate . return_value , ) , ) )