source: python/tests/test_filterbank.py @ 26adcfb

feature/autosinkfeature/constantqfeature/pitchshiftfeature/pydocstringsfeature/timestretchpitchshiftsamplertimestretchyinfft+
Last change on this file since 26adcfb was 26adcfb, checked in by Paul Brossier <piem@piem.org>, 7 years ago

moved tests to subdirectory

  • Property mode set to 100755
File size: 590 bytes
Line 
1#! /usr/bin/env python
2
3from numpy.testing import TestCase, run_module_suite
4from numpy.testing import assert_equal, assert_almost_equal
5from numpy import random
6from aubio import cvec, filterbank
7
8class aubio_filterbank_test_case(TestCase):
9
10  def test_members(self):
11    f = filterbank(40, 512)
12    assert_equal ([f.n_filters, f.win_s], [40, 512])
13
14  def test_set_coeffs(self):
15    f = filterbank(40, 512)
16    r = random.random([40, 512 / 2 + 1]).astype('float32')
17    f.set_coeffs(r)
18    assert_equal (r, f.get_coeffs())
19
20if __name__ == '__main__':
21  from unittest import main
22  main()
23
Note: See TracBrowser for help on using the repository browser.