(n, shape)
| 15 | |
| 16 | @contextmanager |
| 17 | def random_images(n, shape): |
| 18 | with tmpdir() as dirname: |
| 19 | for i in range(n): |
| 20 | fn = os.path.join(dirname, f"image.{i}.png") |
| 21 | x = np.random.randint(0, 255, size=shape).astype("u1") |
| 22 | imsave(fn, x, check_contrast=False) |
| 23 | |
| 24 | yield os.path.join(dirname, "*.png") |
| 25 | |
| 26 | |
| 27 | def test_imread(): |
no test coverage detected