#NEWLINE# @ raises ( ValueError ) #NEWLINE# @ patch ( 'menpo.io.output.base.Path.exists' ) #NEWLINE# @ patch ( '{}.open' . format ( __name__ ) , create = True ) #NEWLINE# def test_export_file_handle_file_extension_not_match_no_dot( mock_open , exists ) : #NEWLINE# #INDENT# exists . return_value = False #NEWLINE# with open ( fake_path ) as f : #NEWLINE# #INDENT# type ( f ) . name = PropertyMock ( return_value = fake_path ) #NEWLINE# mio . export_landmark_file ( test_lg , f , extension = 'pts' ) #NEWLINE# #UNINDENT# assert ( mock_open . name . call_count == 1 )