Showing the changes to python/tests (1 of 1 file). Show all
Unified · Split
| @@ -136,6 +136,22 @@ class aubio_fft_test_case(TestCase): · 135 unmodified lines | ||
| 136 | 136 | assert_almost_equal ( r[0], impulse, decimal = 6) |
| 137 | 137 | assert_almost_equal ( r[1:], 0) |
| 138 | 138 | |
| 139 | + def test_large_input_timegrain(self): | |
| 140 | + win_s = 1024 | |
| 141 | + f = fft(win_s) | |
| 142 | + t = fvec(win_s + 1) | |
| 143 | + print f(t) | |
| 144 | + with self.assertRaises(ValueError): | |
| 145 | + print f(t) | |
| 146 | + | |
| 147 | + def test_small_input_timegrain(self): | |
| 148 | + win_s = 1024 | |
| 149 | + f = fft(win_s) | |
| 150 | + t = fvec(1) | |
| 151 | + print f(t).phas | |
| 152 | + with self.assertRaises(ValueError): | |
| 153 | + f(t) | |
| 154 | + | |
| 139 | 155 | if __name__ == '__main__': |
| 140 | 156 | from unittest import main |
| 141 | 157 | main() |