Skip to content

Commit

Permalink
added bouding box to test
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristofferEdlund committed Oct 16, 2023
1 parent 0c4d3e1 commit a9018b2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/darwin/exporter/formats/export_darwin_1_0_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,15 @@ def test_complete_annotation_file(self):
{"x": 531.6440000000002, "y": 428.4196},
{"x": 529.8140000000002, "y": 426.5896},
]

bounding_box = {"x": 557.66,
"y": 428.98,
"w": 160.76,
"h": 315.3
}

annotation_class = dt.AnnotationClass(name="test", annotation_type="polygon")
annotation = dt.Annotation(annotation_class=annotation_class, data={"path": polygon_path}, subs=[])
annotation = dt.Annotation(annotation_class=annotation_class, data={"path": polygon_path, "bounding_box": bounding_box}, subs=[])

annotation_file = dt.AnnotationFile(
path=Path("test.json"),
Expand Down

0 comments on commit a9018b2

Please sign in to comment.