Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -140,18 +140,30 @@ class aubio_fft_test_case(TestCase): · 139 unmodified lines | |||
| 140 | win_s = 1024 | 140 | win_s = 1024 |
| 141 | f = fft(win_s) | 141 | f = fft(win_s) |
| 142 | t = fvec(win_s + 1) | 142 | t = fvec(win_s + 1) |
| 143 | print f(t) | ||
| 144 | with self.assertRaises(ValueError): | 143 | with self.assertRaises(ValueError): |
| 145 | print f(t) | 144 | f(t) |
| 146 | 145 | ||
| 147 | def test_small_input_timegrain(self): | 146 | def test_small_input_timegrain(self): |
| 148 | win_s = 1024 | 147 | win_s = 1024 |
| 149 | f = fft(win_s) | 148 | f = fft(win_s) |
| 150 | t = fvec(1) | 149 | t = fvec(1) |
| 151 | print f(t).phas | ||
| 152 | with self.assertRaises(ValueError): | 150 | with self.assertRaises(ValueError): |
| 153 | f(t) | 151 | f(t) |
| 154 | 152 | ||
| 153 | def test_large_input_fftgrain(self): | ||
| 154 | win_s = 1024 | ||
| 155 | f = fft(win_s) | ||
| 156 | s = cvec(win_s + 1) | ||
| 157 | with self.assertRaises(ValueError): | ||
| 158 | f.rdo(s) | ||
| 159 | |||
| 160 | def test_small_input_timegrain(self): | ||
| 161 | win_s = 1024 | ||
| 162 | f = fft(win_s) | ||
| 163 | s = cvec(16) | ||
| 164 | with self.assertRaises(ValueError): | ||
| 165 | f.rdo(s) | ||
| 166 | |||
| 155 | if __name__ == '__main__': | 167 | if __name__ == '__main__': |
| 156 | from unittest import main | 168 | from unittest import main |
| 157 | main() | 169 | main() |