summaryrefslogtreecommitdiff
path: root/debian/patches/skip_ppc64.diff
blob: e730a224b5143063727c9db9b38d09fb8f6bb4b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/python/tests/test_fft.py b/python/tests/test_fft.py
index fa349e5..a8f82b9 100755
--- a/python/tests/test_fft.py
+++ b/python/tests/test_fft.py
@@ -33,7 +33,14 @@ class aubio_fft_test_case(TestCase):
         f = fft (win_s)
         fftgrain = f (timegrain)
         assert_equal ( fftgrain.norm, 0 )
-        assert_equal ( fftgrain.phas, 0 )
+        try:
+            assert_equal ( fftgrain.phas, 0 )
+        except AssertionError:
+            assert_equal (fftgrain.phas[fftgrain.phas > 0], +pi)
+            assert_equal (fftgrain.phas[fftgrain.phas < 0], -pi)
+            assert_equal (np.abs(fftgrain.phas[np.abs(fftgrain.phas) != pi]), 0)
+            self.skipTest('fft(fvec(%d)).phas != +0, ' % win_s \
+                    + 'This is expected when using fftw3 on powerpc.')
 
     def test_impulse(self):
         """ check the transform of one impulse at a random place """
diff --git a/python/tests/test_phasevoc.py b/python/tests/test_phasevoc.py
index 23cbad5..957d3b1 100755
--- a/python/tests/test_phasevoc.py
+++ b/python/tests/test_phasevoc.py
@@ -46,7 +46,14 @@ class aubio_pvoc_test_case(TestCase):
             r = f.rdo(s)
             assert_equal ( t, 0.)
             assert_equal ( s.norm, 0.)
-            assert_equal ( s.phas, 0.)
+            try:
+                assert_equal ( s.phas, 0 )
+            except AssertionError:
+                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 \
+                        + 'This is expected when using fftw3 on powerpc.')
             assert_equal ( r, 0.)
 
     @params(