Changeset 168a154 for python/tests
- Timestamp:
- May 10, 2016, 11:20:07 PM (9 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- ad9f999
- Parents:
- 1b62ee9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_phasevoc.py
r1b62ee9 r168a154 56 56 ( 512, 4), 57 57 ( 512, 2), 58 #( 129, 2), 59 #( 320, 4), 60 #( 13, 8), 58 61 (1024, 8), 59 62 (1024, 4), … … 107 110 assert_array_less(sq_error, max_sq_error) 108 111 112 class aubio_pvoc_strange_params(TestCase): 113 114 def test_win_size_short(self): 115 with self.assertRaises(RuntimeError): 116 pvoc(1, 1) 117 118 def test_hop_size_long(self): 119 with self.assertRaises(RuntimeError): 120 pvoc(1024, 1025) 121 109 122 def test_large_input_timegrain(self): 110 123 win_s = 1024 … … 135 148 f.rdo(s) 136 149 150 class aubio_pvoc_wrong_params(TestCase): 151 152 def test_wrong_buf_size(self): 153 win_s = -1 154 with self.assertRaises(ValueError): 155 pvoc(win_s) 156 157 def test_buf_size_too_small(self): 158 win_s = 1 159 with self.assertRaises(RuntimeError): 160 pvoc(win_s) 161 162 def test_hop_size_negative(self): 163 win_s = 512 164 hop_s = -2 165 with self.assertRaises(ValueError): 166 pvoc(win_s, hop_s) 167 168 def test_hop_size_too_small(self): 169 win_s = 1 170 hop_s = 1 171 with self.assertRaises(RuntimeError): 172 pvoc(win_s, hop_s) 173 174 def test_buf_size_not_power_of_two(self): 175 win_s = 320 176 hop_s = win_s // 2 177 try: 178 with self.assertRaises(RuntimeError): 179 pvoc(win_s, hop_s) 180 except AssertionError as e: 181 # when compiled with fftw3, aubio supports non power of two fft sizes 182 self.skipTest('creating aubio.pvoc with size %d did not fail' % win_s) 183 137 184 if __name__ == '__main__': 138 185 from nose2 import main
Note: See TracChangeset
for help on using the changeset viewer.