test_al.py 752 B

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