Skip to content

Commit c035caa

Browse files
committed
Add test of add/remove layer
1 parent 2940c1c commit c035caa

File tree

1 file changed

+11
-0
lines changed
  • python/jupytergis_lab/jupytergis_lab/notebook/tests

1 file changed

+11
-0
lines changed

python/jupytergis_lab/jupytergis_lab/notebook/tests/test_api.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,14 @@ def test_sourcelayer(self):
2727
color_expr=color,
2828
)
2929
assert self.doc.layers[tif_layer]["parameters"]["color"] == color
30+
31+
32+
class TestLayerManipulation(TestDocument):
33+
def test_add_remove_layer(self):
34+
layer_id = self.doc.add_tiff_layer(
35+
url="https://s2downloads.eox.at/demo/EOxCloudless/2020/rgbnir/s2cloudless2020-16bits_sinlge-file_z0-4.tif",
36+
)
37+
assert len(self.doc.layers) == 1
38+
39+
self.doc.remove_layer(layer_id)
40+
assert len(self.doc.layers) == 0

0 commit comments

Comments
 (0)