summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ossaudiodev.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2008-08-17 00:36:03 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2008-08-17 00:36:03 (GMT)
commit1e45c58a55504451bef995ce9dcfe71ec504c33a (patch)
treed0be7e846e4b1f9d9c8dbd99e8c9e5b65b09958b /Lib/test/test_ossaudiodev.py
parente0d12eb85cff367497090b1fdc58582edc0d4c99 (diff)
downloadcpython-1e45c58a55504451bef995ce9dcfe71ec504c33a.zip
cpython-1e45c58a55504451bef995ce9dcfe71ec504c33a.tar.gz
cpython-1e45c58a55504451bef995ce9dcfe71ec504c33a.tar.bz2
Make test_ossaudiodev work.
Diffstat (limited to 'Lib/test/test_ossaudiodev.py')
-rw-r--r--Lib/test/test_ossaudiodev.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_ossaudiodev.py b/Lib/test/test_ossaudiodev.py
index eb4dd02..2a1eba7 100644
--- a/Lib/test/test_ossaudiodev.py
+++ b/Lib/test/test_ossaudiodev.py
@@ -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()