[Python-checkins] r57403 - in python/trunk/Lib/test: output/test_ossaudiodev test_ossaudiodev.py
georg.brandl
python-checkins at python.org
Fri Aug 24 20:35:28 CEST 2007
Author: georg.brandl
Date: Fri Aug 24 20:35:27 2007
New Revision: 57403
Removed:
python/trunk/Lib/test/output/test_ossaudiodev
Modified:
python/trunk/Lib/test/test_ossaudiodev.py
Log:
Remove output file for test_ossaudiodev, also properly close the dsp object.
Deleted: /python/trunk/Lib/test/output/test_ossaudiodev
==============================================================================
--- /python/trunk/Lib/test/output/test_ossaudiodev Fri Aug 24 20:35:27 2007
+++ (empty file)
@@ -1,2 +0,0 @@
-test_ossaudiodev
-playing test sound file (expected running time: 2.93 sec)
Modified: python/trunk/Lib/test/test_ossaudiodev.py
==============================================================================
--- python/trunk/Lib/test/test_ossaudiodev.py (original)
+++ python/trunk/Lib/test/test_ossaudiodev.py Fri Aug 24 20:35:27 2007
@@ -76,8 +76,7 @@
# 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 @@
"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 @@
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__":
More information about the Python-checkins
mailing list