Make test_ossaudiodev work.
This commit is contained in:
parent
e0d12eb85c
commit
1e45c58a55
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue