[Python-checkins] r65733 - python/trunk/Lib/test/test_ossaudiodev.py
antoine.pitrou
python-checkins at python.org
Sun Aug 17 02:36:03 CEST 2008
Author: antoine.pitrou
Date: Sun Aug 17 02:36:03 2008
New Revision: 65733
Log:
Make test_ossaudiodev work.
Modified:
python/trunk/Lib/test/test_ossaudiodev.py
Modified: python/trunk/Lib/test/test_ossaudiodev.py
==============================================================================
--- python/trunk/Lib/test/test_ossaudiodev.py (original)
+++ python/trunk/Lib/test/test_ossaudiodev.py Sun Aug 17 02:36:03 2008
@@ -56,7 +56,7 @@
dsp.fileno()
# Make sure the read-only attributes work.
- self.failUnless(dsp.close)
+ self.failIf(dsp.closed)
self.assertEqual(dsp.name, "/dev/dsp")
self.assertEqual(dsp.mode, "w", "bad dsp.mode: %r" % dsp.mode)
@@ -74,7 +74,7 @@
# set parameters based on .au file headers
dsp.setparameters(AFMT_S16_NE, nchannels, rate)
- self.assertEquals("%.2f" % expected_time, "2.93")
+ self.assertTrue(abs(expected_time - 2.94) < 1e-2, expected_time)
t1 = time.time()
dsp.write(data)
dsp.close()
More information about the Python-checkins
mailing list