diff options
Diffstat (limited to 'Lib/test/test_ossaudiodev.py')
-rw-r--r-- | Lib/test/test_ossaudiodev.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_ossaudiodev.py b/Lib/test/test_ossaudiodev.py index 8da22eb..97d5989 100644 --- a/Lib/test/test_ossaudiodev.py +++ b/Lib/test/test_ossaudiodev.py @@ -77,8 +77,7 @@ class OSSAudioDevTests(unittest.TestCase): # set parameters based on .au file headers dsp.setparameters(AFMT_S16_NE, nchannels, rate) - print ("playing test sound file (expected running time: %.2f sec)" - % expected_time) + self.assertEquals("%.2f" % expected_time, "2.93") t1 = time.time() dsp.write(data) dsp.close() @@ -121,7 +120,6 @@ class OSSAudioDevTests(unittest.TestCase): "setparameters%r: returned %r" % (config, result)) def set_bad_parameters(self, dsp): - # Now try some configurations that are presumably bogus: eg. 300 # channels currently exceeds even Hollywood's ambitions, and # negative sampling rate is utter nonsense. setparameters() should @@ -166,7 +164,7 @@ class OSSAudioDevTests(unittest.TestCase): def test_main(): try: dsp = ossaudiodev.open('w') - except IOError as msg: + except (ossaudiodev.error, IOError) as msg: if msg.args[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY): raise TestSkipped(msg) |