mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
Raise TestSkipped, not ImportError.
Honesty's the best policy.
This commit is contained in:
parent
3af826ebca
commit
040c17fe38
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
from test_support import verbose, findfile, TestFailed
|
||||
from test_support import verbose, findfile, TestFailed, TestSkipped
|
||||
import linuxaudiodev
|
||||
import errno
|
||||
import os
|
||||
|
@ -11,7 +11,7 @@ def play_sound_file(path):
|
|||
a = linuxaudiodev.open('w')
|
||||
except linuxaudiodev.error, msg:
|
||||
if msg[0] in (errno.EACCES, errno.ENODEV):
|
||||
raise ImportError, msg
|
||||
raise TestSkipped, msg
|
||||
raise TestFailed, msg
|
||||
else:
|
||||
a.write(data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue