3 This script will test highgui's window functionality
6 # name of this test and it's requirements
7 TESTNAME = "cvNamedWindow"
10 # needed for sys.exit(int) and .works file handling
14 # check requirements and delete flag file if it exists
15 if not works.check_files( REQUIRED, TESTNAME ):
19 # import the necessary things for OpenCV
21 from python.highgui import *
22 from python.cv import *
25 win_name = "testing..."
27 # create a window and save return code
28 res = cvNamedWindow(win_name,CV_WINDOW_AUTOSIZE)
30 # if returncode is ok, window creation was sucessful
32 # something went wrong, so return an errorcode
36 cvDestroyWindow( win_name )
38 # create flag file for following tests
39 works.set_file(TESTNAME)