Showing the changes to python/tests (1 of 5 files). Show all
Unified · Split
| @@ -13,6 +13,15 @@ class aubio_sink_test_case(TestCase): · 12 unmodified lines | |||
| 13 | def setUp(self): | 13 | def setUp(self): |
| 14 | if not len(list_of_sounds): self.skipTest('add some sound files in \'python/tests/sounds\'') | 14 | if not len(list_of_sounds): self.skipTest('add some sound files in \'python/tests/sounds\'') |
| 15 | 15 | ||
| 16 | def test_many_sinks(self): | ||
| 17 | for i in range(100): | ||
| 18 | g = sink('/tmp/f.wav', 0) | ||
| 19 | write = 256 | ||
| 20 | for n in range(200): | ||
| 21 | vec = fvec(write) | ||
| 22 | g(vec, write) | ||
| 23 | del g | ||
| 24 | |||
| 16 | def test_read(self): | 25 | def test_read(self): |
| 17 | for path in list_of_sounds: | 26 | for path in list_of_sounds: |
| 18 | for samplerate, hop_size in zip([0, 44100, 8000, 32000], [512, 1024, 64, 256]): | 27 | for samplerate, hop_size in zip([0, 44100, 8000, 32000], [512, 1024, 64, 256]): |
| @@ -30,8 +39,8 @@ class aubio_sink_test_case(TestCase): · 11 unmodified lines | |||
| 30 | print total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")", | 39 | print total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")", |
| 31 | print "from", f.uri, | 40 | print "from", f.uri, |
| 32 | print "to", g.uri | 41 | print "to", g.uri |
| 42 | #del f, g | ||
| 33 | 43 | ||
| 34 | if __name__ == '__main__': | 44 | if __name__ == '__main__': |
| 35 | from unittest import main | 45 | from unittest import main |
| 36 | main() | 46 | main() |
| 37 | |||