From b6931bc1d3c5febe8f5784864d40e443b4b95ff8 Mon Sep 17 00:00:00 2001 From: Daniel Stoops Date: Sun, 30 Jun 2024 14:26:25 +0300 Subject: [PATCH 1/2] Add test_tileset() --- tests/test_properties.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_properties.py b/tests/test_properties.py index af97b9b..0d31edd 100644 --- a/tests/test_properties.py +++ b/tests/test_properties.py @@ -38,6 +38,7 @@ ShadowMode, SolidColorMaterial, StripeMaterial, + TileSet, Uri, ViewFrom, ) @@ -866,3 +867,14 @@ def test_label_offset(): label = Label(pixelOffset=Cartesian2Value(values=[5, 5])) assert str(label) == expected_result + + +def test_tileset(): + expected_result = """{ + "show": true, + "uri": "../SampleData/Cesium3DTiles/Batched/BatchedColors/tileset.json" +}""" + tileset = TileSet( + show=True, uri="../SampleData/Cesium3DTiles/Batched/BatchedColors/tileset.json" + ) + assert str(tileset) == expected_result From 21653dbbf4c5999e81371c792344617c13a8c72a Mon Sep 17 00:00:00 2001 From: Daniel Stoops Date: Mon, 1 Jul 2024 10:46:38 +0300 Subject: [PATCH 2/2] TileSet -> Tileset --- src/czml3/properties.py | 2 +- tests/test_properties.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/czml3/properties.py b/src/czml3/properties.py index d7899c6..d392804 100644 --- a/src/czml3/properties.py +++ b/src/czml3/properties.py @@ -618,7 +618,7 @@ class Point(BaseCZMLObject): @attr.s(str=False, frozen=True, kw_only=True) -class TileSet(BaseCZMLObject): +class Tileset(BaseCZMLObject): """A 3D Tiles tileset.""" show = attr.ib(default=None) diff --git a/tests/test_properties.py b/tests/test_properties.py index 0d31edd..c6cba7e 100644 --- a/tests/test_properties.py +++ b/tests/test_properties.py @@ -38,7 +38,7 @@ ShadowMode, SolidColorMaterial, StripeMaterial, - TileSet, + Tileset, Uri, ViewFrom, ) @@ -874,7 +874,7 @@ def test_tileset(): "show": true, "uri": "../SampleData/Cesium3DTiles/Batched/BatchedColors/tileset.json" }""" - tileset = TileSet( + tileset = Tileset( show=True, uri="../SampleData/Cesium3DTiles/Batched/BatchedColors/tileset.json" ) assert str(tileset) == expected_result