ref: 7daa8811896e8395aabc51fc5df1c87dea29699a
parent: f9a543e3989c0e8fb45ae05c8deb315f23fe27c4
author: Paul Brossier <piem@piem.org>
date: Mon Oct 3 08:24:35 EDT 2016
python/tests/test_source.py: only check if last frames are non silent on brownnoise (weak)
--- a/python/tests/test_source.py
+++ b/python/tests/test_source.py
@@ -56,7 +56,7 @@
total_frames += read
if read < f.hop_size:
assert_equal(samples[read:], 0)
- if 'silence' not in f.uri:
+ if 'brownnoise' in f.uri:
self.assertEquals(np.count_nonzero(samples[:read]), read)
break
#result_str = "read {:.2f}s ({:d} frames in {:d} blocks at {:d}Hz) from {:s}"
@@ -158,7 +158,7 @@
total_frames += read
if read < f.hop_size:
assert_equal(samples[:,read:], 0)
- if 'silence' not in f.uri:
+ if 'brownnoise' in f.uri:
self.assertEquals(np.count_nonzero(samples[:,:read]), read)
break
#result_str = "read {:.2f}s ({:d} frames in {:d} channels and {:d} blocks at {:d}Hz) from {:s}"