[Python-checkins] python/dist/src/Lib/test test_ossaudiodev.py,1.2,1.3
fdrake@users.sourceforge.net
fdrake@users.sourceforge.net
Tue, 07 Jan 2003 23:09:46 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv16671
Modified Files:
test_ossaudiodev.py
Log Message:
- be explicit: audio data files should be opened in binary mode
- ossaudiodev.open() raises IOError, not ossaudiodev.error, for cases
which get mapped to TestSkipped
Index: test_ossaudiodev.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_ossaudiodev.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_ossaudiodev.py 10 Dec 2002 16:27:35 -0000 1.2
--- test_ossaudiodev.py 8 Jan 2003 07:09:43 -0000 1.3
***************
*** 14,18 ****
def read_sound_file(path):
! fp = open(path, 'r')
size, enc, rate, nchannels, extra = sunaudio.gethdr(fp)
data = fp.read()
--- 14,18 ----
def read_sound_file(path):
! fp = open(path, 'rb')
size, enc, rate, nchannels, extra = sunaudio.gethdr(fp)
data = fp.read()
***************
*** 31,35 ****
try:
a = ossaudiodev.open('w')
! except ossaudiodev.error, msg:
if msg[0] in (errno.EACCES, errno.ENODEV, errno.EBUSY):
raise TestSkipped, msg
--- 31,35 ----
try:
a = ossaudiodev.open('w')
! except IOError, msg:
if msg[0] in (errno.EACCES, errno.ENODEV, errno.EBUSY):
raise TestSkipped, msg