def test_upper_extension_mapped_to_lower(): import menpo.io.input.base as mio_base from pathlib import Path ext_map = MagicMock() mio_base.importer_for_filepath(Path('fake_path.JPG'), ext_map) ext_map.get.assert_called_with('.jpg')
def can_import_img(path): try: importer_for_filepath(path, image_types) return True except ValueError: return False