Ignore:
Timestamp:
Jan 31, 2014, 10:14:26 PM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
c76345e
Parents:
2e17371
Message:

python/tests/test_{source,sink}.py: add close() tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_source.py

    r2e17371 r4949182  
    6969            self.read_from_sink(f)
    7070
     71    def test_close_file(self):
     72        samplerate = 0 # use native samplerate
     73        hop_size = 256
     74        for p in list_of_sounds:
     75            f = source(p, samplerate, hop_size)
     76            f.close()
     77
     78    def test_close_file_twice(self):
     79        samplerate = 0 # use native samplerate
     80        hop_size = 256
     81        for p in list_of_sounds:
     82            f = source(p, samplerate, hop_size)
     83            f.close()
     84            f.close()
     85
    7186if __name__ == '__main__':
    7287    from unittest import main
Note: See TracChangeset for help on using the changeset viewer.