#NEWLINE# @ patch ( 'pybuilder.reactor.os.path.isfile' , return_value = False ) #NEWLINE# @ patch ( 'pybuilder.reactor.os.path.join' , side_effect = ( lambda * x : '/' . join ( x ) ) ) #NEWLINE# @ patch ( 'pybuilder.reactor.os.path.isdir' , return_value = True ) #NEWLINE# @ patch ( 'pybuilder.reactor.os.path.exists' , return_value = True ) #NEWLINE# @ patch ( 'pybuilder.reactor.os.path.abspath' , return_value = 'spam' ) #NEWLINE# def test_should_raise_when_verifying_project_directory_and_build_descriptor_is_not_a_file( self , os_path_abspath , os_path_exists , os_path_isdir , os_path_join , os_path_isfile ) : #NEWLINE# #INDENT# self . assertRaises ( PyBuilderException , os_path_exists . reactor . verify_project_directory , 'spam' , 'eggs' ) #NEWLINE# os_path_abspath . assert_called_with ( 'spam' ) #NEWLINE# os_path_exists . assert_has_calls ( [ call ( 'spam' ) , call ( 'spam/eggs' ) ] ) #NEWLINE# os_path_isdir . assert_called_with ( 'spam' ) #NEWLINE# os_path_join . assert_called_with ( 'spam' , 'eggs' ) #NEWLINE# os_path_isfile . assert_called_with ( 'spam/eggs' )