[py] fix pvoc tests on powerpc
[aubio.git] / python / tests / test_phasevoc.py
index e17d1fd..b228269 100755 (executable)
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 
 from numpy.testing import TestCase, assert_equal, assert_array_less
-from _tools import parametrize
+from _tools import parametrize, skipTest
 from aubio import fvec, cvec, pvoc, float_type
 import numpy as np
 
@@ -51,10 +51,19 @@ class Test_aubio_pvoc_test_case(object):
                 assert_equal (s.phas[s.phas > 0], +np.pi)
                 assert_equal (s.phas[s.phas < 0], -np.pi)
                 assert_equal (np.abs(s.phas[np.abs(s.phas) != np.pi]), 0)
-                self.skipTest('pvoc(fvec(%d)).phas != +0, ' % win_s \
+                skipTest('pvoc(fvec(%d)).phas != +0, ' % win_s \
                         + 'This is expected when using fftw3 on powerpc.')
             assert_equal ( r, 0.)
 
+    def test_no_overlap(self):
+        win_s, hop_s = 1024, 1024
+        f = pvoc (win_s, hop_s)
+        t = fvec (hop_s)
+        for _ in range(4):
+            s = f(t)
+            r = f.rdo(s)
+            assert_equal ( t, 0.)
+
     resynth_noise_args = "hop_s, ratio"
     resynth_noise_values = [
             ( 256, 8),