Changeset 2871e2b for python/tests


Ignore:
Timestamp:
May 11, 2016, 2:52:19 AM (9 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, pitchshift, sampler, timestretch, yinfft+
Children:
ece990f
Parents:
84838c3
Message:

python/tests/test_filter.py: add tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_filter.py

    r84838c3 r2871e2b  
    6969    assert_almost_equal (expected[1][16:], u)
    7070
     71  def test_set_biquad(self):
     72    f = digital_filter(3)
     73    f.set_biquad(0., 0., 0, 0., 0.)
     74
     75  def test_set_biquad_wrong_order(self):
     76    f = digital_filter(4)
     77    with self.assertRaises(ValueError):
     78        f.set_biquad(0., 0., 0, 0., 0.)
     79
     80class aubio_filter_wrong_params(TestCase):
     81
     82    def test_negative_order(self):
     83        with self.assertRaises(ValueError):
     84            digital_filter(-1)
     85
    7186if __name__ == '__main__':
    72   from unittest import main
    73   main()
    74 
     87    from unittest import main
     88    main()
Note: See TracChangeset for help on using the changeset viewer.