#NEWLINE# @ patch ( 'menpo.io.output.base.landmark_types' ) #NEWLINE# @ patch ( 'menpo.io.output.base.Path.exists' ) #NEWLINE# @ patch ( 'menpo.io.output.base.Path.open' ) #NEWLINE# def test_export_filepath_explicit_ext_dot( mock_open , exists , landmark_types ) : #NEWLINE# #INDENT# exists . return_value = False #NEWLINE# mio . export_landmark_file ( test_lg , fake_path , extension = '.fake' ) #NEWLINE# mock_open . assert_called_with ( 'wb' ) #NEWLINE# landmark_types . __getitem__ . assert_called_with ( '.fake' ) #NEWLINE# export_function = landmark_types . __getitem__ . return_value #NEWLINE# assert ( export_function . call_count == 1 )