try:
    from . import generic as g
except BaseException:
    import generic as g


class UnwrapTest(g.unittest.TestCase):

    def test_image(self):
        a = g.get_mesh('bunny.ply', force="mesh")

        u = a.unwrap()
        assert u.visual.uv.shape == (len(u.vertices), 2)

        checkerboard = g.np.kron(
            [[1, 0] * 4, [0, 1] * 4] * 4, g.np.ones((10, 10)))
        try:
            from PIL import Image
        except BaseException:
            return

        image = Image.fromarray(
            (checkerboard * 255).astype(g.np.uint8))
        u = a.unwrap(image=image)
        # make sure image was attached correctly
        assert u.visual.material.image.size == image.size


if __name__ == '__main__':
    g.trimesh.util.attach_to_log()
    g.unittest.main()

@@ -143,16 +143,164 @@
 (self):%0A
+        try:%0A            import xatlas%0A        except BaseException:%0A            g.log.info('not testing unwrap as no %60xatlas%60')%0A            return%0A
         

make unwrap test optional