diff options
author | Paul Brossier <piem@debian.org> | 2016-11-27 22:23:50 +0100 |
---|---|---|
committer | Paul Brossier <piem@debian.org> | 2016-11-27 22:23:50 +0100 |
commit | 2ae29740be5afffdf24b4bb43dd4e407b33a4089 (patch) | |
tree | a9b71cecc1794dc0ead5fab6e280c920cab63e91 | |
parent | f6b272e4113bbb4286b088a1487d5da4c94e9a04 (diff) |
skip_ppc64
Gbp-Pq: Name skip_ppc64.diff
-rwxr-xr-x | python/tests/test_fft.py | 9 | ||||
-rwxr-xr-x | python/tests/test_phasevoc.py | 9 |
2 files changed, 16 insertions, 2 deletions
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( |