home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 April / PCWorld_2001-04_cd.bin / Software / TemaCD / webclean / !!!python!!! / BeOpen-Python-2.0.exe / TEST_AL.PY < prev    next >
Encoding:
Python Source  |  2000-09-28  |  707 b   |  25 lines

  1. #! /usr/bin/env python
  2. """Whimpy test script for the al module
  3.    Roger E. Masse
  4. """
  5. import al
  6. from test_support import verbose
  7.  
  8. alattrs = ['__doc__', '__name__', 'getdefault', 'getminmax', 'getname', 'getparams',
  9.            'newconfig', 'openport', 'queryparams', 'setparams']
  10.  
  11. # This is a very unobtrusive test for the existence of the al module and all it's
  12. # attributes.  More comprehensive examples can be found in Demo/al
  13.  
  14. def main():
  15.     # touch all the attributes of al without doing anything
  16.     if verbose:
  17.         print 'Touching al module attributes...'
  18.     for attr in alattrs:
  19.         if verbose:
  20.             print 'touching: ', attr
  21.         getattr(al, attr)
  22.  
  23. main()
  24.  
  25.