/Lib/test/test_al.py

http://unladen-swallow.googlecode.com/ · Python · 25 lines · 13 code · 5 blank · 7 comment · 4 complexity · d864c280cbd47a339502cc257019d892 MD5 · raw file

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