Skip to content

Commit e746662

Browse files
committed
Add allocation test for cvnp
1 parent a636367 commit e746662

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

subprojects/robotpy-cscore/tests/test_cv.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@ def test_empty_img():
77
sink = cs.CvSink("something")
88
_, rimg = sink.grabFrame(img)
99
assert (rimg == img).all()
10+
11+
12+
def test_nonempty_img():
13+
img = np.zeros(shape=(480, 640, 3), dtype=np.uint8)
14+
img2 = np.zeros(shape=(480, 640, 3), dtype=np.uint8)
15+
sink = cs.CvSink("something")
16+
_, img = sink.grabFrame(img)
17+
_, img = sink.grabFrame(img)
18+
assert (img == img2).all()

0 commit comments

Comments
 (0)