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

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Stoops committed Nov 25, 2024
1 parent 73abbae commit 2e27bea
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,3 +1178,12 @@ def test_check_classes_with_references():
"reference": "this#that"
}"""
)


def test_rectangle_coordinates_delete():
assert (
str(RectangleCoordinates(wsen=[0, 0], reference="this#that", delete=True))
== """{
"delete": true
}"""
)
11 changes: 11 additions & 0 deletions tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
RgbaValue,
TimeInterval,
UnitQuaternionValue,
check_reference,
format_datetime_like,
)

Expand Down Expand Up @@ -421,3 +422,13 @@ def test_rgbaf_value():
1.0
]"""
)


def test_check_reference():
with pytest.raises(TypeError):
check_reference("thisthat")
assert check_reference("this#that") is None


def test_format_datetime_like():
assert format_datetime_like(None) is None

0 comments on commit 2e27bea

Please sign in to comment.