diff --git a/Lib/test/test_linuxaudiodev.py b/Lib/test/test_linuxaudiodev.py index 4b612a79935..ad7fdf238dd 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)