History

python/tests/test_fft.py: skip test fft(zeros).phas == 0 if needed, expected powerpc

Paul Brossier committed 9 years ago

Commit d98f3c01 parent 4093c0c2 files · +16 −2Browse files

Showing the changes to python (2 of 2 files). Show all

Unified · Split

2 files
  1. python/tests/test_fft.py +8 −1
  2. python/tests/test_phasevoc.py +8 −1
python/tests/test_fft.py+8−1
@@ -33,7 +33,14 @@ class aubio_fft_test_case(TestCase): · 32 unmodified lines
33 f = fft (win_s)33 f = fft (win_s)
34 fftgrain = f (timegrain)34 fftgrain = f (timegrain)
35 assert_equal ( fftgrain.norm, 0 )35 assert_equal ( fftgrain.norm, 0 )
36 assert_equal ( fftgrain.phas, 0 )36 try:
37 assert_equal ( fftgrain.phas, 0 )
38 except AssertionError:
39 assert_equal (fftgrain.phas[fftgrain.phas > 0], +pi)
40 assert_equal (fftgrain.phas[fftgrain.phas < 0], -pi)
41 assert_equal (np.abs(fftgrain.phas[np.abs(fftgrain.phas) != pi]), 0)
42 self.skipTest('fft(fvec(%d)).phas != +0, ' % win_s \
43 + 'This is expected when using fftw3 on powerpc.')
37 44
38 def test_impulse(self):45 def test_impulse(self):
39 """ check the transform of one impulse at a random place """46 """ check the transform of one impulse at a random place """
python/tests/test_phasevoc.py+8−1
@@ -46,7 +46,14 @@ class aubio_pvoc_test_case(TestCase): · 45 unmodified lines
46 r = f.rdo(s)46 r = f.rdo(s)
47 assert_equal ( t, 0.)47 assert_equal ( t, 0.)
48 assert_equal ( s.norm, 0.)48 assert_equal ( s.norm, 0.)
49 assert_equal ( s.phas, 0.)49 try:
50 assert_equal ( s.phas, 0 )
51 except AssertionError:
52 assert_equal (s.phas[s.phas > 0], +np.pi)
53 assert_equal (s.phas[s.phas < 0], -np.pi)
54 assert_equal (np.abs(s.phas[np.abs(s.phas) != np.pi]), 0)
55 self.skipTest('pvoc(fvec(%d)).phas != +0, ' % win_s \
56 + 'This is expected when using fftw3 on powerpc.')
50 assert_equal ( r, 0.)57 assert_equal ( r, 0.)
51 58
52 @params(59 @params(

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t