예제 #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')
예제 #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')
예제 #3
0
파일: io.py 프로젝트: menpo/menpocli
def can_import_img(path):
    try:
        importer_for_filepath(path, image_types)
        return True
    except ValueError:
        return False