Showing the changes to python/tests (1 of 1 file). Show all
Unified · Split
| @@ -47,19 +47,19 @@ class aubio_source_test_case(TestCase): · 46 unmodified lines | ||
| 47 | 47 | for p in list_of_sounds: |
| 48 | 48 | try: |
| 49 | 49 | f = source(p, -1) |
| 50 | − except Exception, e: | |
| 51 | − print e | |
| 50 | + except ValueError, e: | |
| 51 | + pass | |
| 52 | 52 | else: |
| 53 | − self.fail('does not fail with wrong samplerate') | |
| 53 | + self.fail('negative samplerate does not raise ValueError') | |
| 54 | 54 | |
| 55 | 55 | def test_wrong_hop_size(self): |
| 56 | 56 | for p in list_of_sounds: |
| 57 | 57 | try: |
| 58 | 58 | f = source(p, 0, -1) |
| 59 | − except Exception, e: | |
| 60 | − print e | |
| 59 | + except ValueError, e: | |
| 60 | + pass | |
| 61 | 61 | 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') | |
| 63 | 63 | |
| 64 | 64 | def test_zero_hop_size(self): |
| 65 | 65 | for p in list_of_sounds: |