Ignore:
Timestamp:
Jan 31, 2014, 10:19:05 PM (10 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:
a2ca72a
Parents:
4949182
Message:

python/tests/test_source.py: improve exception checks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_source.py

    r4949182 rc76345e  
    4848            try:
    4949                f = source(p, -1)
    50             except Exception, e:
    51                 print e
     50            except ValueError, e:
     51                pass
    5252            else:
    53                 self.fail('does not fail with wrong samplerate')
     53                self.fail('negative samplerate does not raise ValueError')
    5454
    5555    def test_wrong_hop_size(self):
     
    5757            try:
    5858                f = source(p, 0, -1)
    59             except Exception, e:
    60                 print e
     59            except ValueError, e:
     60                pass
    6161            else:
    62                 self.fail('does not fail with wrong hop_size %d' % f.hop_size)
     62                self.fail('negative hop_size does not raise ValueError')
    6363
    6464    def test_zero_hop_size(self):
Note: See TracChangeset for help on using the changeset viewer.