History

python/tests/test_fft.py: more tests

Paul Brossier committed 10 years ago

Commit fcef3fd1 parent de0a4921 file · +21 −0Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/tests/test_fft.py+21−0
@@ -164,6 +164,27 @@ class aubio_fft_test_case(TestCase): · 163 unmodified lines
164 with self.assertRaises(ValueError):164 with self.assertRaises(ValueError):
165 f.rdo(s)165 f.rdo(s)
166 166
167class aubio_fft_wrong_params(TestCase):
168
169 def test_wrong_buf_size(self):
170 win_s = -1
171 with self.assertRaises(ValueError):
172 fft(win_s)
173
174 def test_buf_size_not_power_of_two(self):
175 # when compiled with fftw3, aubio supports non power of two fft sizes
176 win_s = 320
177 try:
178 with self.assertRaises(RuntimeError):
179 fft(win_s)
180 except AssertionError as e:
181 self.skipTest('creating aubio.fft with size %d did not fail' % win_s)
182
183 def test_buf_size_too_small(self):
184 win_s = 1
185 with self.assertRaises(RuntimeError):
186 fft(win_s)
187
167if __name__ == '__main__':188if __name__ == '__main__':
168 from nose2 import main189 from nose2 import main
169 main()190 main()

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