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