test_fvec.py: zero_crossing_rate almost equal
authorPaul Brossier <piem@piem.org>
Wed, 11 Jul 2012 20:41:04 +0000 (14:41 -0600)
committerPaul Brossier <piem@piem.org>
Wed, 11 Jul 2012 20:41:04 +0000 (14:41 -0600)
interfaces/python/test_fvec.py

index b374c4e116ad80cd33f708c0df6743c432c8fa54..80e8fceb36b3418c91f00e73be8cdecd1fee2e83 100644 (file)
@@ -85,7 +85,7 @@ class aubio_fvec_test_case(TestCase):
 
     def test_zero_crossing_rate(self):
         a = array([0,1,-1], dtype='float32')
-        self.assertEquals (zero_crossing_rate(a), 1./3 )
+        assert_almost_equal (zero_crossing_rate(a), 1./3. )
         a = array([0.]*100, dtype='float32')
         self.assertEquals (zero_crossing_rate(a), 0 )
         a = array([-1.]*100, dtype='float32')