import unittest
from clib.converts import resize_to_yolo
from skimage import data


class ResizeYoloTest(unittest.TestCase):
    def setUp(self):
        self.grayimg = data.coins()
        self.rgbimg = data.astronaut()

    def test_resize_to_yolo(self):
        self.assertEqual(resize_to_yolo(self.rgbimg).shape,
                         (448, 448, 3))
#        with self.assertRaises(ValueError ) as cm:
#            resize_to_yolo(self.grayimg)
#        exception = cm.exception
#        self.assertEqual(exception.message, '')

@@ -49,16 +49,23 @@
 _to_yolo
+, batch
 %0Afrom sk
@@ -82,16 +82,53 @@
 rt data%0A
+from skimage.transform import resize%0A
 %0A%0Aclass 
@@ -571,8 +571,358 @@
 ge, '')%0A
+%0A%0Aclass BatchTest(unittest.TestCase):%0A    def setUp(self):%0A        self.rgbimg1 = data.astronaut()%0A        self.rgbimg2 = resize(self.rgbimg1, (400, 400), mode='reflect')%0A        self.dat = %5B(self.rgbimg2, 0), (self.rgbimg1, 1)%5D%0A%0A    def test_batch(self):%0A        self.assertEqual(batch(self.dat)%5B1%5D%5B0%5D.shape,%0A                         (400, 400, 3))%0A

test code for batch. but is it right?.