Skip to content

Commit

Permalink
Merge pull request #609 from 12rambau/localtileserver
Browse files Browse the repository at this point in the history
test: don't test localtileserver yet
  • Loading branch information
12rambau authored Nov 21, 2022
2 parents 089e5d1 + 8f19c8e commit 2d5126f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_SepalMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
# create a seed so that we can check values
random.seed(42)

# as using localtileserver is still in beta version it is not yet installed by
# default. Using this lazy import we can skip some tests when in github CD/CI
# will be removed when https://github.com/girder/large_image/pull/927 is ready
try:
from localtileserver import TileClient # noqa: F401

is_set_localtileserver = True
except ModuleNotFoundError:
is_set_localtileserver = False


class TestSepalMap:
def test_init(self):
Expand Down Expand Up @@ -119,6 +129,10 @@ def test_zoom_bounds(self):

return

@pytest.mark.skipif(
is_set_localtileserver is False,
reason="localtileserver implementation is still in beta",
)
def test_add_raster(self, rgb, byte):

m = sm.SepalMap()
Expand Down Expand Up @@ -429,6 +443,10 @@ def test_find_layer(self, ee_map_with_layers):

return

@pytest.mark.skipif(
is_set_localtileserver is False,
reason="localtileserver implementation is still in beta",
)
def test_zoom_raster(self, byte):

m = sm.SepalMap()
Expand Down

0 comments on commit 2d5126f

Please # to comment.