Mercurial > cpython-lru_cache-weakref
annotate Lib/test/test_cd.py @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | d399a4537f6d |
| children | aedd2d0dcb31 |
| rev | line source |
|---|---|
|
4891
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
1 #! /usr/bin/env python |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
2 """Whimpy test script for the cd module |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
3 Roger E. Masse |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
4 """ |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
5 import cd |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
6 from test_support import verbose |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
7 |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
8 cdattrs = ['BLOCKSIZE', 'CDROM', 'DATASIZE', 'ERROR', 'NODISC', 'PAUSED', 'PLAYING', 'READY', |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
9 'STILL', '__doc__', '__name__', 'atime', 'audio', 'catalog', 'control', 'createparser', 'error', |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
10 'ident', 'index', 'msftoframe', 'open', 'pnum', 'ptime'] |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
11 |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
12 |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
13 # This is a very inobstrusive test for the existance of the cd module and all it's |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
14 # attributes. More comprehensive examples can be found in Demo/cd and |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
15 # require that you have a CD and a CD ROM drive |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
16 |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
17 def main(): |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
18 # touch all the attributes of cd without doing anything |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
19 if verbose: |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
20 print 'Touching cd module attributes...' |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
21 for attr in cdattrs: |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
22 if verbose: |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
23 print 'touching: ', attr |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
24 getattr(cd, attr) |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
25 |
|
d399a4537f6d
This is a very inobstrusive test for the existance of the SGI cd module
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
26 main() |
