Skip to content

Commit

Permalink
Add allocation test for cvnp
Browse files Browse the repository at this point in the history
  • Loading branch information
virtuald committed Feb 18, 2024
1 parent a636367 commit e746662
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions subprojects/robotpy-cscore/tests/test_cv.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ def test_empty_img():
sink = cs.CvSink("something")
_, rimg = sink.grabFrame(img)
assert (rimg == img).all()


def test_nonempty_img():
img = np.zeros(shape=(480, 640, 3), dtype=np.uint8)
img2 = np.zeros(shape=(480, 640, 3), dtype=np.uint8)
sink = cs.CvSink("something")
_, img = sink.grabFrame(img)
_, img = sink.grabFrame(img)
assert (img == img2).all()

0 comments on commit e746662

Please sign in to comment.