Skip to content

Commit

Permalink
Fix some Python unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Aug 8, 2024
1 parent 03a0328 commit de5dcf3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions rerun_py/tests/unit/test_leaf_transforms3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def test_leaf_transform3d() -> None:
)
print(f"{arch}\n")

assert arch.translations == rr.components.LeafTranslation3DBatch._optional(translations)
assert arch.rotation_axis_angles == rr.components.LeafRotationAxisAngleBatch._optional(rotation_axis_angles)
assert arch.quaternions == rr.components.LeafRotationQuatBatch._optional(quaternions)
assert arch.scales == rr.components.LeafScale3DBatch._optional(scales)
assert arch.mat3x3 == rr.components.LeafTransformMat3x3Batch._optional(mat3x3)
assert arch.translations == rr.components.LeafTranslation3DBatch._required(translations)
assert arch.rotation_axis_angles == rr.components.LeafRotationAxisAngleBatch._required(rotation_axis_angles)
assert arch.quaternions == rr.components.LeafRotationQuatBatch._required(quaternions)
assert arch.scales == rr.components.LeafScale3DBatch._required(scales)
assert arch.mat3x3 == rr.components.LeafTransformMat3x3Batch._required(mat3x3)
14 changes: 7 additions & 7 deletions rerun_py/tests/unit/test_transform3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,25 +126,25 @@ def test_transform3d() -> None:
)
print(f"{arch}\n")

assert arch.scale == rr.components.Scale3DBatch._optional(
assert arch.scale == rr.components.Scale3DBatch._required(
none_empty_or_value(scale, rr.components.Scale3D(scale)) # type: ignore[arg-type]
)
assert arch.rotation_axis_angle == rr.components.RotationAxisAngleBatch._optional(
assert arch.rotation_axis_angle == rr.components.RotationAxisAngleBatch._required(
none_empty_or_value(rotation_axis_angle, rr.components.RotationAxisAngle([1, 2, 3], Angle(deg=10)))
)
assert arch.quaternion == rr.components.RotationQuatBatch._optional(
assert arch.quaternion == rr.components.RotationQuatBatch._required(
none_empty_or_value(quaternion, rr.components.RotationQuat(xyzw=[1, 2, 3, 4]))
)
assert arch.translation == rr.components.Translation3DBatch._optional(
assert arch.translation == rr.components.Translation3DBatch._required(
none_empty_or_value(translation, rr.components.Translation3D([1, 2, 3]))
)
assert arch.mat3x3 == rr.components.TransformMat3x3Batch._optional(
assert arch.mat3x3 == rr.components.TransformMat3x3Batch._required(
none_empty_or_value(mat3x3, rr.components.TransformMat3x3([[1, 2, 3], [4, 5, 6], [7, 8, 9]]))
)
assert arch.axis_length == rr.components.AxisLengthBatch._optional(
assert arch.axis_length == rr.components.AxisLengthBatch._required(
none_empty_or_value(axis_length, rr.components.AxisLength(1.0))
)
assert arch.relation == rr.components.TransformRelationBatch._optional(relation)
assert arch.relation == rr.components.TransformRelationBatch._required(relation)


def test_transform_mat3x3_snippets() -> None:
Expand Down

0 comments on commit de5dcf3

Please sign in to comment.