From: Neal Norwitz Date: Thu, 5 Jan 2006 07:17:35 +0000 (+0000) Subject: Backport: If the audio file does not exist, the test should be skipped. X-Git-Tag: v2.4.3c1~155 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd2bd893eaa1018d73c971d5cb82cec84db9ccfa;p=thirdparty%2FPython%2Fcpython.git Backport: If the audio file does not exist, the test should be skipped. --- diff --git a/Lib/test/test_linuxaudiodev.py b/Lib/test/test_linuxaudiodev.py index 1a11e8f03862..fe902b5a0319 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 89849e9d402a..abb6c1eddcff 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