Skip to content

Commit

Permalink
add test for save_counts which I forgot
Browse files Browse the repository at this point in the history
  • Loading branch information
HaleySchuhl committed May 7, 2024
1 parent eaf93bf commit 5e96360
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_annotate_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,13 @@ def test_points_save_coords(test_data):
drawer.save_coords()

assert outputs.observations["default"]["coordinates"]["value"] == [(158, 531), (361, 112), (500, 418)]

def test_points_save_counts(test_data):
img = cv2.imread(test_data.small_rgb_img)
totalpoints1 = [(158, 531), (361, 112), (500, 418)]
drawer = Points(img=img)
# Populate attribute with coords
drawer.count = {'default': 1}
drawer.save_counts()

assert outputs.observations["default"]["object_count"]["value"] == 1

0 comments on commit 5e96360

Please sign in to comment.