diff options
author | Georg Brandl <georg@python.org> | 2007-08-24 18:35:27 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-08-24 18:35:27 (GMT) |
commit | e7445de2b1c72fe8fa7310b629e0d2982eb46b65 (patch) | |
tree | 8552b7298d9e273023859bd6e9ec4b16df83015f /Lib | |
parent | 0c6a438aeac25e60705a91b5b94e67c397ef8442 (diff) | |
download | cpython-e7445de2b1c72fe8fa7310b629e0d2982eb46b65.zip cpython-e7445de2b1c72fe8fa7310b629e0d2982eb46b65.tar.gz cpython-e7445de2b1c72fe8fa7310b629e0d2982eb46b65.tar.bz2 |
Remove output file for test_ossaudiodev, also properly close the dsp object.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/output/test_ossaudiodev | 2 | ||||
-rw-r--r-- | Lib/test/test_ossaudiodev.py | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/Lib/test/output/test_ossaudiodev b/Lib/test/output/test_ossaudiodev deleted file mode 100644 index f0df5d2..0000000 --- a/Lib/test/output/test_ossaudiodev +++ /dev/null @@ -1,2 +0,0 @@ -test_ossaudiodev -playing test sound file (expected running time: 2.93 sec) diff --git a/Lib/test/test_ossaudiodev.py b/Lib/test/test_ossaudiodev.py index 92104a0..3fb5d6d 100644 --- a/Lib/test/test_ossaudiodev.py +++ b/Lib/test/test_ossaudiodev.py @@ -76,8 +76,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() @@ -119,7 +118,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 @@ -168,6 +166,8 @@ def test_main(): if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY): raise TestSkipped(msg) raise + finally: + dsp.close() test_support.run_unittest(__name__) if __name__ == "__main__": |