Esempio n. 1
0
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')
Esempio n. 2
0
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')
Esempio n. 3
0
File: io.py Progetto: menpo/menpocli
def can_import_img(path):
    try:
        importer_for_filepath(path, image_types)
        return True
    except ValueError:
        return False