Changeset d03ee4b


Ignore:
Timestamp:
Apr 30, 2016, 6:19:23 AM (4 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
6014dc0
Parents:
d13f0bb
Message:

python/tests/test_fft.py: add test to make sure fft.do clashes on wrong size inputs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_fft.py

    rd13f0bb rd03ee4b  
    137137        assert_almost_equal ( r[1:], 0)
    138138
     139    def test_large_input_timegrain(self):
     140        win_s = 1024
     141        f = fft(win_s)
     142        t = fvec(win_s + 1)
     143        print f(t)
     144        with self.assertRaises(ValueError):
     145            print f(t)
     146
     147    def test_small_input_timegrain(self):
     148        win_s = 1024
     149        f = fft(win_s)
     150        t = fvec(1)
     151        print f(t).phas
     152        with self.assertRaises(ValueError):
     153            f(t)
     154
    139155if __name__ == '__main__':
    140156    from unittest import main
Note: See TracChangeset for help on using the changeset viewer.