Showing the changes to python/tests/test_source.py (1 of 1 file). Show all
Unified · Split
| @@ -56,7 +56,7 @@ class aubio_source_read_test_case(aubio_source_test_case_base): · 55 unmodified lines | |||
| 56 | total_frames += read | 56 | total_frames += read |
| 57 | if read < f.hop_size: | 57 | if read < f.hop_size: |
| 58 | assert_equal(samples[read:], 0) | 58 | assert_equal(samples[read:], 0) |
| 59 | if 'silence' not in f.uri: | 59 | if 'brownnoise' in f.uri: |
| 60 | self.assertEquals(np.count_nonzero(samples[:read]), read) | 60 | self.assertEquals(np.count_nonzero(samples[:read]), read) |
| 61 | break | 61 | break |
| 62 | #result_str = "read {:.2f}s ({:d} frames in {:d} blocks at {:d}Hz) from {:s}" | 62 | #result_str = "read {:.2f}s ({:d} frames in {:d} blocks at {:d}Hz) from {:s}" |
| @@ -158,7 +158,7 @@ class aubio_source_readmulti_test_case(aubio_source_read_test_case): · 95 unmodified lines | |||
| 158 | total_frames += read | 158 | total_frames += read |
| 159 | if read < f.hop_size: | 159 | if read < f.hop_size: |
| 160 | assert_equal(samples[:,read:], 0) | 160 | assert_equal(samples[:,read:], 0) |
| 161 | if 'silence' not in f.uri: | 161 | if 'brownnoise' in f.uri: |
| 162 | self.assertEquals(np.count_nonzero(samples[:,:read]), read) | 162 | self.assertEquals(np.count_nonzero(samples[:,:read]), read) |
| 163 | break | 163 | break |
| 164 | #result_str = "read {:.2f}s ({:d} frames in {:d} channels and {:d} blocks at {:d}Hz) from {:s}" | 164 | #result_str = "read {:.2f}s ({:d} frames in {:d} channels and {:d} blocks at {:d}Hz) from {:s}" |