(path)
| 72 | |
| 73 | |
| 74 | def _get_paths_from_images(path): |
| 75 | assert os.path.isdir(path), '{:s} is not a valid directory'.format(path) |
| 76 | images = [] |
| 77 | for dirpath, _, fnames in sorted(os.walk(path)): |
| 78 | for fname in sorted(fnames): |
| 79 | if is_image_file(fname): |
| 80 | img_path = os.path.join(dirpath, fname) |
| 81 | images.append(img_path) |
| 82 | assert images, '{:s} has no valid image file'.format(path) |
| 83 | return images |
| 84 | |
| 85 | |
| 86 | ''' |
no test coverage detected