| 
									
										
										
										
											1997-01-03 22:39:03 +00:00
										 |  |  | #! /usr/bin/env python | 
					
						
							|  |  |  | """Whimpy test script for the al module
 | 
					
						
							|  |  |  |    Roger E. Masse | 
					
						
							|  |  |  | """
 | 
					
						
							| 
									
										
										
										
											2008-05-14 01:08:21 +00:00
										 |  |  | from test.test_support import verbose, import_module | 
					
						
							|  |  |  | al = import_module('al', deprecated=True) | 
					
						
							| 
									
										
										
										
											1997-01-03 22:39:03 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | alattrs = ['__doc__', '__name__', 'getdefault', 'getminmax', 'getname', 'getparams', | 
					
						
							| 
									
										
										
										
											1998-03-26 19:42:58 +00:00
										 |  |  |            'newconfig', 'openport', 'queryparams', 'setparams'] | 
					
						
							| 
									
										
										
										
											1997-01-03 22:39:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-07-22 21:49:32 +00:00
										 |  |  | # This is a very unobtrusive test for the existence of the al module and all its | 
					
						
							| 
									
										
										
										
											1997-01-03 22:39:03 +00:00
										 |  |  | # attributes.  More comprehensive examples can be found in Demo/al | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-03-03 04:19:29 +00:00
										 |  |  | def test_main(): | 
					
						
							| 
									
										
										
										
											1997-01-03 22:39:03 +00:00
										 |  |  |     # touch all the attributes of al without doing anything | 
					
						
							|  |  |  |     if verbose: | 
					
						
							| 
									
										
										
										
											1998-03-26 19:42:58 +00:00
										 |  |  |         print 'Touching al module attributes...' | 
					
						
							| 
									
										
										
										
											1997-01-03 22:39:03 +00:00
										 |  |  |     for attr in alattrs: | 
					
						
							| 
									
										
										
										
											1998-03-26 19:42:58 +00:00
										 |  |  |         if verbose: | 
					
						
							|  |  |  |             print 'touching: ', attr | 
					
						
							|  |  |  |         getattr(al, attr) | 
					
						
							| 
									
										
										
										
											1997-01-03 22:39:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-03-03 04:19:29 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if __name__ == '__main__': | 
					
						
							|  |  |  |     test_main() |