Changeset 0229e51


Ignore:
Timestamp:
Apr 19, 2016, 12:45:56 AM (4 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
fbd7c80
Parents:
9b7f238
Message:

python/tests/test_sink.py: remove useless many_sinks_not_closed and more cruft

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_sink.py

    r9b7f238 r0229e51  
    3030        shutil.rmtree(tmpdir)
    3131
    32     def test_many_sinks_not_closed(self):
    33         from tempfile import mkdtemp
    34         import os.path
    35         import shutil
    36         tmpdir = mkdtemp()
    37         sink_list = []
    38         try:
    39             for i in range(many_files):
    40                 path = os.path.join(tmpdir, 'f-' + str(i) + '.wav')
    41                 g = sink(path, 0)
    42                 sink_list.append(g)
    43                 write = 256
    44                 for n in range(200):
    45                     vec = fvec(write)
    46                     g(vec, write)
    47         except Exception:
    48             pass
    49         else:
    50             self.fail("does not fail on too many files open")
    51         for g in sink_list:
    52             g.close()
    53         shutil.rmtree(tmpdir)
    54 
    5532    def test_read_and_write(self):
    5633
     
    7047                    total_frames += read
    7148                    if read < f.hop_size: break
    72                 if 0:
    73                     print ("read", "%.2fs" % (total_frames / float(f.samplerate) ) ),
    74                     print ("(", total_frames, "frames", "in" ),
    75                     print (total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")" ),
    76                     print ("from", f.uri ),
    77                     print ("to", g.uri)
    7849                del_tmp_sink_path(sink_path)
    7950
     
    9566                    total_frames += read
    9667                    if read < f.hop_size: break
    97                 if 0:
    98                     print ("read", "%.2fs" % (total_frames / float(f.samplerate) ) ),
    99                     print ("(", total_frames, "frames", "in" ),
    100                     print (f.channels, "channels", "in" ),
    101                     print (total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")" ),
    102                     print ("from", f.uri ),
    103                     print ("to", g.uri ),
    104                     print ("in", g.channels, "channels")
    10568                del_tmp_sink_path(sink_path)
    10669
Note: See TracChangeset for help on using the changeset viewer.