blob: 9a45a7d3a7d2b380e9b3ca94ed3a072a59446887 [file] [log] [blame]
Roger E. Masse32e949d1997-01-03 23:00:13 +00001#! /usr/bin/env python
2"""Whimpy test script for the cd module
3 Roger E. Masse
4"""
5import cd
Fredrik Lundhf7850422001-01-17 21:51:36 +00006from test_support import verbose
Roger E. Masse32e949d1997-01-03 23:00:13 +00007
8cdattrs = ['BLOCKSIZE', 'CDROM', 'DATASIZE', 'ERROR', 'NODISC', 'PAUSED', 'PLAYING', 'READY',
Guido van Rossum41360a41998-03-26 19:42:58 +00009 'STILL', '__doc__', '__name__', 'atime', 'audio', 'catalog', 'control', 'createparser', 'error',
10 'ident', 'index', 'msftoframe', 'open', 'pnum', 'ptime']
Roger E. Masse32e949d1997-01-03 23:00:13 +000011
12
Jeremy Hyltona05e2932000-06-28 14:48:01 +000013# This is a very inobtrusive test for the existence of the cd module and all it's
Roger E. Masse32e949d1997-01-03 23:00:13 +000014# attributes. More comprehensive examples can be found in Demo/cd and
15# require that you have a CD and a CD ROM drive
16
17def main():
18 # touch all the attributes of cd without doing anything
19 if verbose:
Guido van Rossum41360a41998-03-26 19:42:58 +000020 print 'Touching cd module attributes...'
Roger E. Masse32e949d1997-01-03 23:00:13 +000021 for attr in cdattrs:
Guido van Rossum41360a41998-03-26 19:42:58 +000022 if verbose:
23 print 'touching: ', attr
24 getattr(cd, attr)
Roger E. Masse32e949d1997-01-03 23:00:13 +000025
26main()