Changeset 7debeb6
- Timestamp:
- Nov 1, 2018, 10:34:14 PM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
- Children:
- d4fae34
- Parents:
- 86deeed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_phasevoc.py
r86deeed r7debeb6 2 2 3 3 from numpy.testing import TestCase, assert_equal, assert_array_less 4 from ._tools import parametrize 4 5 from aubio import fvec, cvec, pvoc, float_type 5 from nose2 import main6 from nose2.tools import params7 6 import numpy as np 8 7 … … 19 18 return np.random.rand(hop_s).astype(float_type) * 2. - 1. 20 19 21 class aubio_pvoc_test_case(TestCase):20 class Test_aubio_pvoc_test_case: 22 21 """ pvoc object test case """ 23 22 … … 57 56 assert_equal ( r, 0.) 58 57 59 @params( 58 resynth_noise_args = "hop_s, ratio" 59 resynth_noise_values = [ 60 60 ( 256, 8), 61 61 ( 256, 4), … … 79 79 (8192, 4), 80 80 (8192, 2), 81 ) 81 ] 82 83 @parametrize(resynth_noise_args, resynth_noise_values) 82 84 def test_resynth_steps_noise(self, hop_s, ratio): 83 85 """ check the resynthesis of a random signal is correct """ … … 85 87 self.reconstruction(sigin, hop_s, ratio) 86 88 87 @params( 89 resynth_sine_args = "samplerate, hop_s, ratio, freq" 90 resynth_sine_values = [ 88 91 (44100, 256, 8, 441), 89 92 (44100, 256, 4, 1203), … … 100 103 (96000, 1024, 8, 47000), 101 104 (96000, 1024, 8, 20), 102 ) 105 ] 106 107 @parametrize(resynth_sine_args, resynth_sine_values) 103 108 def test_resynth_steps_sine(self, samplerate, hop_s, ratio, freq): 104 109 """ check the resynthesis of a sine is correct """ … … 191 196 192 197 if __name__ == '__main__': 198 from unittest import main 193 199 main() 194
Note: See TracChangeset
for help on using the changeset viewer.