Skip to content

Commit ad8f434

Browse files
committed
test update
1 parent d32ccee commit ad8f434

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

labelbox/data/annotation_types/data/tiled_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import requests
99
import numpy as np
1010

11-
from retry import retry
11+
from retry import retry #TODO not part of the package atm. need to add in?
1212
import tensorflow as f
1313
from PIL import Image
1414
from pyproj import Transformer

tests/data/annotation_types/test_tiled_image.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
from labelbox.data.annotation_types.data import tiled_image
33
from labelbox.data.annotation_types.geometry.point import Point
44
from labelbox.data.annotation_types.data.tiled_image import (EPSG, TiledBounds,
5-
TileLayer)
5+
TileLayer,
6+
TiledImageData)
67
from pydantic import ValidationError
8+
from retry import retry
79

810

911
@pytest.mark.parametrize("epsg", list(EPSG))
@@ -27,3 +29,20 @@ def test_tiled_bounds_same(epsg):
2729
with pytest.raises(ValidationError):
2830
tiled_bounds = TiledBounds(epsg=epsg,
2931
bounds=[single_bound, single_bound])
32+
33+
34+
# def test_create_tiled_image_data():
35+
# bounds_points = [Point(x=0, y=0), Point(x=5, y=5)]
36+
# url = "https://labelbox.s3-us-west-2.amazonaws.com/pathology/{z}/{x}/{y}.png"
37+
# zoom_levels = [1, 10]
38+
39+
# tile_layer = TileLayer(url=url, name="slippy map tile")
40+
# tile_bounds = TiledBounds(epsg=EPSG.EPSG4326, bounds=bounds_points)
41+
# tiled_image_data = TiledImageData(tile_layer=tile_layer,
42+
# tile_bounds=tile_bounds,
43+
# zoom_levels=zoom_levels,
44+
# version=2)
45+
# assert isinstance(tiled_image_data, TiledImageData)
46+
# assert tiled_image_data.tile_bounds == bounds_points
47+
# assert tiled_image_data.tile_layer.url == url
48+
# assert tiled_image_data.zoom_levels == zoom_levels

0 commit comments

Comments
 (0)