diff options
author | Moshe Zadka <moshez@math.huji.ac.il> | 2000-08-04 12:59:40 (GMT) |
---|---|---|
committer | Moshe Zadka <moshez@math.huji.ac.il> | 2000-08-04 12:59:40 (GMT) |
commit | 323a5086ae3ebc4e6290d9bbbe384af5a952a485 (patch) | |
tree | 817cedaf1435a7ddbe283be038ff38d41398d796 /Lib | |
parent | b9fb1f23fe2b73aa21bfa3ac4fe8ac5e6431917c (diff) | |
download | cpython-323a5086ae3ebc4e6290d9bbbe384af5a952a485.zip cpython-323a5086ae3ebc4e6290d9bbbe384af5a952a485.tar.gz cpython-323a5086ae3ebc4e6290d9bbbe384af5a952a485.tar.bz2 |
In case the user isn't allowed to access /dev/dsp or /dev/dsp isn't there
at all (my computer doesn't have a Sound Blaster), this doesn't mean
there's a bug in linuxaudiodev. The only error the test suite skips
is currently ImportError -- so that's what we raise. If you see a problem
with this patch, say so and I'll retract. If you think raising an ImportError
sucks, you're right -- but I ain't gonna buy a SB and I sure ain't gonna
let the test-suite fail on my machine.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_linuxaudiodev.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_linuxaudiodev.py b/Lib/test/test_linuxaudiodev.py index 4b612a7..ad7fdf2 100644 --- a/Lib/test/test_linuxaudiodev.py +++ b/Lib/test/test_linuxaudiodev.py @@ -1,5 +1,6 @@ from test_support import verbose, findfile, TestFailed import linuxaudiodev +import errno import os def play_sound_file(path): @@ -9,6 +10,8 @@ def play_sound_file(path): try: a = linuxaudiodev.open('w') except linuxaudiodev.error, msg: + if msg[0] in (errno.EACCES, errno.ENODEV): + raise ImportError, msg raise TestFailed, msg else: a.write(data) |