|
@@ -1,7 +1,6 @@
|
|
import json
|
|
import json
|
|
import os.path as osp
|
|
import os.path as osp
|
|
|
|
|
|
-import nose
|
|
|
|
import numpy as np
|
|
import numpy as np
|
|
|
|
|
|
from labelme import utils
|
|
from labelme import utils
|
|
@@ -11,9 +10,9 @@ here = osp.dirname(osp.abspath(__file__))
|
|
|
|
|
|
|
|
|
|
def test_img_b64_to_array():
|
|
def test_img_b64_to_array():
|
|
- json_file = osp.join(here, '../static/apc2016_obj3.json')
|
|
|
|
|
|
+ json_file = osp.join(here, '../tutorial/apc2016_obj3.json')
|
|
data = json.load(open(json_file))
|
|
data = json.load(open(json_file))
|
|
img_b64 = data['imageData']
|
|
img_b64 = data['imageData']
|
|
img = utils.img_b64_to_array(img_b64)
|
|
img = utils.img_b64_to_array(img_b64)
|
|
- nose.tools.assert_equal(img.dtype, np.uint8)
|
|
|
|
- nose.tools.assert_equal(img.shape, (907, 1210, 3))
|
|
|
|
|
|
+ assert img.dtype == np.uint8
|
|
|
|
+ assert img.shape == (907, 1210, 3)
|