summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-01-05 07:17:35 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-01-05 07:17:35 (GMT)
commitbd2bd893eaa1018d73c971d5cb82cec84db9ccfa (patch)
tree551c032c934c83d49f9586b0d910bb473120c869
parent586ad5584102909c5bf5a37a73cfb25d6f04d54e (diff)
downloadcpython-bd2bd893eaa1018d73c971d5cb82cec84db9ccfa.zip
cpython-bd2bd893eaa1018d73c971d5cb82cec84db9ccfa.tar.gz
cpython-bd2bd893eaa1018d73c971d5cb82cec84db9ccfa.tar.bz2
Backport: If the audio file does not exist, the test should be skipped.
-rw-r--r--Lib/test/test_linuxaudiodev.py2
-rw-r--r--Lib/test/test_ossaudiodev.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_linuxaudiodev.py b/Lib/test/test_linuxaudiodev.py
index 1a11e8f..fe902b5 100644
--- a/Lib/test/test_linuxaudiodev.py
+++ b/Lib/test/test_linuxaudiodev.py
@@ -28,7 +28,7 @@ def play_sound_file(path):
try:
a = linuxaudiodev.open('w')
except linuxaudiodev.error, msg:
- if msg[0] in (errno.EACCES, errno.ENODEV, errno.EBUSY):
+ if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
raise TestSkipped, msg
raise TestFailed, msg
diff --git a/Lib/test/test_ossaudiodev.py b/Lib/test/test_ossaudiodev.py
index 89849e9..abb6c1e 100644
--- a/Lib/test/test_ossaudiodev.py
+++ b/Lib/test/test_ossaudiodev.py
@@ -45,7 +45,7 @@ def play_sound_file(data, rate, ssize, nchannels):
try:
dsp = ossaudiodev.open('w')
except IOError, msg:
- if msg[0] in (errno.EACCES, errno.ENODEV, errno.EBUSY):
+ if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
raise TestSkipped, msg
raise TestFailed, msg