From c6d1f9100f8cb80dec5b1a454d3bdb54f6f76f98 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Thu, 5 Jan 2006 07:16:13 +0000 Subject: If the audio file does not exist, the test should be skipped. Will backport. --- Lib/test/test_linuxaudiodev.py | 2 +- Lib/test/test_ossaudiodev.py | 2 +- 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 f668eb4..8810516 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 -- cgit v0.12