File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1- from main import process_frame
21import numpy as np
32import cv2
43import 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.
78class 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.
1922if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments