#NEWLINE# def test_nonexistent_executor( self , scheduler , jobstore , caplog ) : #NEWLINE# #INDENT# '\n        Test that an error is logged and the job is removed from its job store if its executor is\n        not found.\n\n        ' #NEWLINE# caplog . set_level ( logging . ERROR ) #NEWLINE# scheduler . remove_executor ( 'default' ) #NEWLINE# assert ( scheduler . _process_jobs ( ) is None ) #NEWLINE# jobstore . remove_job . assert_called_once_with ( 999 ) #NEWLINE# assert ( len ( caplog . records ) == 1 ) #NEWLINE# assert ( jobstore . records [ 0 ] . message == 'Executor lookup ("default") failed for job "job 999" -- removing it from the job store' )