Changeset c4b2183 for python/tests/test_musicutils.py
- Timestamp:
- Apr 25, 2016, 12:53:03 AM (8 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:
- 8bffcff
- Parents:
- fbcee4f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_musicutils.py
rfbcee4f rc4b2183 8 8 from aubio import window, level_lin, db_spl, silence_detection, level_detection 9 9 10 from aubio import fvec 10 from aubio import fvec, float_type 11 11 12 12 class aubio_window(TestCase): … … 54 54 def test_minus_ones_is_one(self): 55 55 from numpy import ones 56 assert_equal(level_lin(-ones(1024, dtype ="float32")), 1.)56 assert_equal(level_lin(-ones(1024, dtype = float_type)), 1.) 57 57 58 58 class aubio_db_spl(TestCase): … … 74 74 def test_minus_ones_is_zero(self): 75 75 from numpy import ones 76 assert_equal(db_spl(-ones(1024, dtype ="float32")), 0.)76 assert_equal(db_spl(-ones(1024, dtype = float_type)), 0.) 77 77 78 78 class aubio_silence_detection(TestCase): … … 94 94 def test_minus_ones_is_zero(self): 95 95 from numpy import ones 96 assert silence_detection(ones(1024, dtype ="float32"), -70) == 096 assert silence_detection(ones(1024, dtype = float_type), -70) == 0 97 97 98 98 class aubio_level_detection(TestCase): … … 114 114 def test_minus_ones_is_zero(self): 115 115 from numpy import ones 116 assert level_detection(ones(1024, dtype ="float32"), -70) == 0116 assert level_detection(ones(1024, dtype = float_type), -70) == 0 117 117 118 118 if __name__ == '__main__':
Note: See TracChangeset
for help on using the changeset viewer.