ref: 0229e51755a167111e1345908022337b0115e145
parent: 9b7f238ab4bb6e2de6fbc0c65ebdabea9f8f2a32
author: Paul Brossier <piem@piem.org>
date: Mon Apr 18 20:45:56 EDT 2016
python/tests/test_sink.py: remove useless many_sinks_not_closed and more cruft
--- a/python/tests/test_sink.py
+++ b/python/tests/test_sink.py
@@ -29,29 +29,6 @@
g.close()
shutil.rmtree(tmpdir)
- def test_many_sinks_not_closed(self):
- from tempfile import mkdtemp
- import os.path
- import shutil
- tmpdir = mkdtemp()
- sink_list = []
- try:
- for i in range(many_files):
- path = os.path.join(tmpdir, 'f-' + str(i) + '.wav')
- g = sink(path, 0)
- sink_list.append(g)
- write = 256
- for n in range(200):
- vec = fvec(write)
- g(vec, write)
- except Exception:
- pass
- else:
- self.fail("does not fail on too many files open")
- for g in sink_list:
- g.close()
- shutil.rmtree(tmpdir)
-
def test_read_and_write(self):
if not len(list_of_sounds):
@@ -69,12 +46,6 @@
g(vec, read)
total_frames += read
if read < f.hop_size: break
- if 0:
- print ("read", "%.2fs" % (total_frames / float(f.samplerate) ) ),
- print ("(", total_frames, "frames", "in" ),
- print (total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")" ),
- print ("from", f.uri ),
- print ("to", g.uri)
del_tmp_sink_path(sink_path)
def test_read_and_write_multi(self):
@@ -94,14 +65,6 @@
g.do_multi(vec, read)
total_frames += read
if read < f.hop_size: break
- if 0:
- print ("read", "%.2fs" % (total_frames / float(f.samplerate) ) ),
- print ("(", total_frames, "frames", "in" ),
- print (f.channels, "channels", "in" ),
- print (total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")" ),
- print ("from", f.uri ),
- print ("to", g.uri ),
- print ("in", g.channels, "channels")
del_tmp_sink_path(sink_path)
def test_close_file(self):