Ignore:
Timestamp:
Sep 14, 2017, 4:33:21 PM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
9a52962
Parents:
c4fc0f2
Message:

python/tests/test_filterbank*.py: clean-up, improve get_coeff tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_filterbank.py

    rc4fc0f2 re116e19  
    11#! /usr/bin/env python
    22
    3 from unittest import main
    4 from numpy.testing import TestCase
    5 from numpy.testing import assert_equal, assert_almost_equal
    63import numpy as np
     4from numpy.testing import TestCase, assert_equal, assert_almost_equal
     5
    76from aubio import cvec, filterbank, float_type
    87from .utils import array_from_text_file
     
    6362        assert_almost_equal ( expected, f.get_coeffs() )
    6463
     64    def test_mfcc_coeffs_get_coeffs(self):
     65        f = filterbank(40, 512)
     66        coeffs = f.get_coeffs()
     67        self.assertIsInstance(coeffs, np.ndarray)
     68        assert_equal (coeffs, 0)
     69        assert_equal (np.shape(coeffs), (40, 512 / 2 + 1))
     70
    6571class aubio_filterbank_wrong_values(TestCase):
    6672
     
    8288
    8389if __name__ == '__main__':
    84     main()
     90    import nose2
     91    nose2.main()
Note: See TracChangeset for help on using the changeset viewer.