Index: Lib/test/test_cl.py =================================================================== --- Lib/test/test_cl.py (revisione 60650) +++ Lib/test/test_cl.py (copia locale) @@ -1,10 +1,15 @@ -#! /usr/bin/env python -"""Whimpy test script for the cl module +"""Whimpy test script for the cl module. + +This is a very inobtrusive test for the existence of the cl +module and all its attributes. Roger E. Masse """ + import cl -from test.test_support import verbose +import unittest +from test.test_support import verbose, run_unittest + clattrs = ['ADDED_ALGORITHM_ERROR', 'ALAW', 'ALGORITHM_ID', 'ALGORITHM_VERSION', 'AUDIO', 'AWARE_ERROR', 'AWARE_MPEG_AUDIO', 'AWARE_MULTIRATE', 'AWCMP_CONST_QUAL', 'AWCMP_FIXED_RATE', @@ -63,16 +68,20 @@ 'YUV422DC', 'YUV422HC', '__doc__', '__name__', 'cvt_type', 'error'] -# This is a very inobtrusive test for the existence of the cl -# module and all its attributes. - -def main(): - # touch all the attributes of al without doing anything - if verbose: - print 'Touching cl module attributes...' - for attr in clattrs: +class TestCl(unittest.TestCase): + + def test_touch_attributes(self): + # touch all the attributes of cl without doing anything if verbose: - print 'touching: ', attr - getattr(cl, attr) + print 'Touching cl module attributes...' + for attr in clattrs: + if verbose: + print 'touching: ', attr + getattr(cl, attr) -main() + +def test_main(): + run_unittest(TestCl) + +if __name__ == '__main__': + test_main()