def test__load_stow_json(): json_file = osp.join(_this_dir, 'data', 'stow_layout_1.json') bin_contents, work_order = jsk_apc2016_common._load_stow_json(json_file) assert_true(isinstance(bin_contents, dict)) for bin_, contents in bin_contents.items(): assert_true(isinstance(bin_, basestring)) assert_true(isinstance(contents, list)) assert_true(isinstance(work_order, list))
def test_visualize_stow_contents(): json_file = osp.join(_this_dir, 'data', 'stow_layout_1.json') _, work_order = jsk_apc2016_common._load_stow_json(json_file) img = jsk_apc2016_common.visualize_stow_contents(work_order) assert_equal(img.shape, (960, 1280, 3)) assert_equal(img.dtype, np.uint8)