1"""Whimpy test script for the cl module 2 Roger E. Masse 3""" 4from test.test_support import verbose, import_module 5 6cl = import_module('cl') 7 8clattrs = ['ADDED_ALGORITHM_ERROR', 'ALAW', 'ALGORITHM_ID', 9'ALGORITHM_VERSION', 'AUDIO', 'AWARE_ERROR', 'AWARE_MPEG_AUDIO', 10'AWARE_MULTIRATE', 'AWCMP_CONST_QUAL', 'AWCMP_FIXED_RATE', 11'AWCMP_INDEPENDENT', 'AWCMP_JOINT_STEREO', 'AWCMP_LOSSLESS', 12'AWCMP_MPEG_LAYER_I', 'AWCMP_MPEG_LAYER_II', 'AWCMP_STEREO', 13'Algorithm', 'AlgorithmNumber', 'AlgorithmType', 'AudioFormatName', 14'BAD_ALGORITHM_NAME', 'BAD_ALGORITHM_TYPE', 'BAD_BLOCK_SIZE', 15'BAD_BOARD', 'BAD_BUFFERING', 'BAD_BUFFERLENGTH_NEG', 16'BAD_BUFFERLENGTH_ODD', 'BAD_BUFFER_EXISTS', 'BAD_BUFFER_HANDLE', 17'BAD_BUFFER_POINTER', 'BAD_BUFFER_QUERY_SIZE', 'BAD_BUFFER_SIZE', 18'BAD_BUFFER_SIZE_POINTER', 'BAD_BUFFER_TYPE', 19'BAD_COMPRESSION_SCHEME', 'BAD_COMPRESSOR_HANDLE', 20'BAD_COMPRESSOR_HANDLE_POINTER', 'BAD_FRAME_SIZE', 21'BAD_FUNCTIONALITY', 'BAD_FUNCTION_POINTER', 'BAD_HEADER_SIZE', 22'BAD_INITIAL_VALUE', 'BAD_INTERNAL_FORMAT', 'BAD_LICENSE', 23'BAD_MIN_GT_MAX', 'BAD_NO_BUFFERSPACE', 'BAD_NUMBER_OF_BLOCKS', 24'BAD_PARAM', 'BAD_PARAM_ID_POINTER', 'BAD_PARAM_TYPE', 'BAD_POINTER', 25'BAD_PVBUFFER', 'BAD_SCHEME_POINTER', 'BAD_STREAM_HEADER', 26'BAD_STRING_POINTER', 'BAD_TEXT_STRING_PTR', 'BEST_FIT', 27'BIDIRECTIONAL', 'BITRATE_POLICY', 'BITRATE_TARGET', 28'BITS_PER_COMPONENT', 'BLENDING', 'BLOCK_SIZE', 'BOTTOM_UP', 29'BUFFER_NOT_CREATED', 'BUF_DATA', 'BUF_FRAME', 'BytesPerPixel', 30'BytesPerSample', 'CHANNEL_POLICY', 'CHROMA_THRESHOLD', 'CODEC', 31'COMPONENTS', 'COMPRESSED_BUFFER_SIZE', 'COMPRESSION_RATIO', 32'COMPRESSOR', 'CONTINUOUS_BLOCK', 'CONTINUOUS_NONBLOCK', 33'CompressImage', 'DATA', 'DECOMPRESSOR', 'DecompressImage', 34'EDGE_THRESHOLD', 'ENABLE_IMAGEINFO', 'END_OF_SEQUENCE', 'ENUM_VALUE', 35'EXACT_COMPRESSION_RATIO', 'EXTERNAL_DEVICE', 'FLOATING_ENUM_VALUE', 36'FLOATING_RANGE_VALUE', 'FRAME', 'FRAME_BUFFER_SIZE', 37'FRAME_BUFFER_SIZE_ZERO', 'FRAME_RATE', 'FRAME_TYPE', 'G711_ALAW', 38'G711_ULAW', 'GRAYSCALE', 'GetAlgorithmName', 'HDCC', 39'HDCC_SAMPLES_PER_TILE', 'HDCC_TILE_THRESHOLD', 'HEADER_START_CODE', 40'IMAGE_HEIGHT', 'IMAGE_WIDTH', 'INTERNAL_FORMAT', 41'INTERNAL_IMAGE_HEIGHT', 'INTERNAL_IMAGE_WIDTH', 'INTRA', 'JPEG', 42'JPEG_ERROR', 'JPEG_NUM_PARAMS', 'JPEG_QUALITY_FACTOR', 43'JPEG_QUANTIZATION_TABLES', 'JPEG_SOFTWARE', 'JPEG_STREAM_HEADERS', 44'KEYFRAME', 'LAST_FRAME_INDEX', 'LAYER', 'LUMA_THRESHOLD', 45'MAX_NUMBER_OF_AUDIO_ALGORITHMS', 'MAX_NUMBER_OF_ORIGINAL_FORMATS', 46'MAX_NUMBER_OF_PARAMS', 'MAX_NUMBER_OF_VIDEO_ALGORITHMS', 'MONO', 47'MPEG_VIDEO', 'MVC1', 'MVC2', 'MVC2_BLENDING', 'MVC2_BLENDING_OFF', 48'MVC2_BLENDING_ON', 'MVC2_CHROMA_THRESHOLD', 'MVC2_EDGE_THRESHOLD', 49'MVC2_ERROR', 'MVC2_LUMA_THRESHOLD', 'NEXT_NOT_AVAILABLE', 50'NOISE_MARGIN', 'NONE', 'NUMBER_OF_FRAMES', 'NUMBER_OF_PARAMS', 51'ORIENTATION', 'ORIGINAL_FORMAT', 'OpenCompressor', 52'OpenDecompressor', 'PARAM_OUT_OF_RANGE', 'PREDICTED', 'PREROLL', 53'ParamID', 'ParamNumber', 'ParamType', 'QUALITY_FACTOR', 54'QUALITY_LEVEL', 'QueryAlgorithms', 'QueryMaxHeaderSize', 55'QueryScheme', 'QuerySchemeFromName', 'RANGE_VALUE', 'RGB', 'RGB332', 56'RGB8', 'RGBA', 'RGBX', 'RLE', 'RLE24', 'RTR', 'RTR1', 57'RTR_QUALITY_LEVEL', 'SAMPLES_PER_TILE', 'SCHEME_BUSY', 58'SCHEME_NOT_AVAILABLE', 'SPEED', 'STEREO_INTERLEAVED', 59'STREAM_HEADERS', 'SetDefault', 'SetMax', 'SetMin', 'TILE_THRESHOLD', 60'TOP_DOWN', 'ULAW', 'UNCOMPRESSED', 'UNCOMPRESSED_AUDIO', 61'UNCOMPRESSED_VIDEO', 'UNKNOWN_SCHEME', 'VIDEO', 'VideoFormatName', 62'Y', 'YCbCr', 'YCbCr422', 'YCbCr422DC', 'YCbCr422HC', 'YUV', 'YUV422', 63'YUV422DC', 'YUV422HC', '__doc__', '__name__', 'cvt_type', 'error'] 64 65 66# This is a very inobtrusive test for the existence of the cl 67# module and all its attributes. 68 69def test_main(): 70 # touch all the attributes of al without doing anything 71 if verbose: 72 print 'Touching cl module attributes...' 73 for attr in clattrs: 74 if verbose: 75 print 'touching: ', attr 76 getattr(cl, attr) 77 78 79 80if __name__ == '__main__': 81 test_main() 82