Skip to content

Commit 5cd4cef

Browse files
fixed name and added comments
1 parent 5d1c0e9 commit 5cd4cef

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
from main import process_frame
21
import numpy as np
32
import cv2
43
import unittest
4+
# Import the functions we want to test.
5+
from main import process_frame
56

67
# This is an example of building a test suite using Python's unittest module.
78
class MyTestCase(unittest.TestCase):
89

9-
def example_test(self):
10+
def test_example(self):
1011
frame = cv2.imread("test.jpg")
1112
results = process_frame(frame)
1213
self.assertLessEqual(results["min"][0], results["max"][0])
1314
self.assertLessEqual(results["min"][1], results["max"][1])
1415
self.assertLessEqual(results["min"][2], results["max"][2])
1516

16-
# You can add your own something_test functions below to expand the test!
17+
# You can add your own test_something functions below to expand the test!
18+
def test_something(self):
19+
self.assertTrue(1 == 1)
1720

1821
# This will run all the tests when this file is executed.
1922
if __name__ == "__main__":

0 commit comments

Comments
 (0)