Mercurial > cpython-lru_cache-weakref
annotate Lib/test/test_cd.py @ 58925:eecf1bef052d 2.6
Merged revisions 78207 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78207 | ezio.melotti | 2010-02-17 01:26:09 +0200 (Wed, 17 Feb 2010) | 1 line
#7930: fix stripid
........
| author | Ezio Melotti <ezio.melotti@gmail.com> |
|---|---|
| date | Tue, 16 Feb 2010 23:29:44 +0000 |
| parents | a55136c78b60 |
| children | f2c90fd05d66 |
| 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 |
|
24442
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
15966
diff
changeset
|
6 from test.test_support import verbose |
|
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
|
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', |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4891
diff
changeset
|
9 'STILL', '__doc__', '__name__', 'atime', 'audio', 'catalog', 'control', 'createparser', 'error', |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4891
diff
changeset
|
10 'ident', 'index', 'msftoframe', 'open', 'pnum', 'ptime'] |
|
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
|
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 |
|
35276
4adbd331d335
Fix all wrong instances of "it's".
Georg Brandl <georg@python.org>
parents:
24442
diff
changeset
|
13 # This is a very inobtrusive test for the existence of the cd module and all its |
|
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
|
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 |
|
45631
a55136c78b60
Add test_main() functions to various tests where it was simple to do. Done so
Brett Cannon <bcannon@gmail.com>
parents:
35276
diff
changeset
|
17 def test_main(): |
|
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
|
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: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4891
diff
changeset
|
20 print 'Touching cd module attributes...' |
|
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
|
21 for attr in cdattrs: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4891
diff
changeset
|
22 if verbose: |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4891
diff
changeset
|
23 print 'touching: ', attr |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4891
diff
changeset
|
24 getattr(cd, attr) |
|
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
|
25 |
|
45631
a55136c78b60
Add test_main() functions to various tests where it was simple to do. Done so
Brett Cannon <bcannon@gmail.com>
parents:
35276
diff
changeset
|
26 |
|
a55136c78b60
Add test_main() functions to various tests where it was simple to do. Done so
Brett Cannon <bcannon@gmail.com>
parents:
35276
diff
changeset
|
27 |
|
a55136c78b60
Add test_main() functions to various tests where it was simple to do. Done so
Brett Cannon <bcannon@gmail.com>
parents:
35276
diff
changeset
|
28 if __name__ == '__main__': |
|
a55136c78b60
Add test_main() functions to various tests where it was simple to do. Done so
Brett Cannon <bcannon@gmail.com>
parents:
35276
diff
changeset
|
29 test_main() |
