0001 #! /usr/bin/env python 0002 """Whimpy test script for the cd module 0003 Roger E. Masse 0004 """ 0005 import cd 0006 from test.test_support import verbose 0007 0008 cdattrs = ['BLOCKSIZE', 'CDROM', 'DATASIZE', 'ERROR', 'NODISC', 'PAUSED', 'PLAYING', 'READY', 0009 'STILL', '__doc__', '__name__', 'atime', 'audio', 'catalog', 'control', 'createparser', 'error', 0010 'ident', 'index', 'msftoframe', 'open', 'pnum', 'ptime'] 0011 0012 0013 # This is a very inobtrusive test for the existence of the cd module and all it's 0014 # attributes. More comprehensive examples can be found in Demo/cd and 0015 # require that you have a CD and a CD ROM drive 0016 0017 def main(): 0018 # touch all the attributes of cd without doing anything 0019 if verbose: 0020 print 'Touching cd module attributes...' 0021 for attr in cdattrs: 0022 if verbose: 0023 print 'touching: ', attr 0024 getattr(cd, attr) 0025 0026 main() 0027
Generated by PyXR 0.9.4