Roger E. Masse | 1f983df | 1997-01-03 22:39:03 +0000 | [diff] [blame] | 1 | #! /usr/bin/env python |
| 2 | """Whimpy test script for the al module |
| 3 | Roger E. Masse |
| 4 | """ |
| 5 | import al |
Barry Warsaw | 408b6d3 | 2002-07-30 23:27:12 +0000 | [diff] [blame] | 6 | from test.test_support import verbose |
Roger E. Masse | 1f983df | 1997-01-03 22:39:03 +0000 | [diff] [blame] | 7 | |
| 8 | alattrs = ['__doc__', '__name__', 'getdefault', 'getminmax', 'getname', 'getparams', |
Guido van Rossum | 41360a4 | 1998-03-26 19:42:58 +0000 | [diff] [blame] | 9 | 'newconfig', 'openport', 'queryparams', 'setparams'] |
Roger E. Masse | 1f983df | 1997-01-03 22:39:03 +0000 | [diff] [blame] | 10 | |
Georg Brandl | 7eb4b7d | 2005-07-22 21:49:32 +0000 | [diff] [blame] | 11 | # This is a very unobtrusive test for the existence of the al module and all its |
Roger E. Masse | 1f983df | 1997-01-03 22:39:03 +0000 | [diff] [blame] | 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: |
Guido van Rossum | 41360a4 | 1998-03-26 19:42:58 +0000 | [diff] [blame] | 17 | print 'Touching al module attributes...' |
Roger E. Masse | 1f983df | 1997-01-03 22:39:03 +0000 | [diff] [blame] | 18 | for attr in alattrs: |
Guido van Rossum | 41360a4 | 1998-03-26 19:42:58 +0000 | [diff] [blame] | 19 | if verbose: |
| 20 | print 'touching: ', attr |
| 21 | getattr(al, attr) |
Roger E. Masse | 1f983df | 1997-01-03 22:39:03 +0000 | [diff] [blame] | 22 | |
| 23 | main() |