Make test_ossaudiodev work.

This commit is contained in:
Antoine Pitrou 2008-08-17 00:36:03 +00:00
parent e0d12eb85c
commit 1e45c58a55
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ class OSSAudioDevTests(unittest.TestCase):
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 @@ class OSSAudioDevTests(unittest.TestCase):
# 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()