]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport: If the audio file does not exist, the test should be skipped.
authorNeal Norwitz <nnorwitz@gmail.com>
Thu, 5 Jan 2006 07:17:35 +0000 (07:17 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Thu, 5 Jan 2006 07:17:35 +0000 (07:17 +0000)
Lib/test/test_linuxaudiodev.py
Lib/test/test_ossaudiodev.py

index 1a11e8f03862cb7085f7656ea0ae2bbe6484cfe8..fe902b5a0319d2a6bdac3f69425dfc837d7ee2f8 100644 (file)
@@ -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
 
index 89849e9d402a40b815f2b07eed9652c64cc16b9d..abb6c1eddcffc6eb88d62bf32c77c3d2892b7d26 100644 (file)
@@ -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