Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Add test_tileset() #146

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/czml3/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 12 additions & 0 deletions tests/test_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
ShadowMode,
SolidColorMaterial,
StripeMaterial,
Tileset,
Uri,
ViewFrom,
)
Expand Down Expand Up @@ -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
Loading