Changeset 980a4f4


Ignore:
Timestamp:
Sep 21, 2016, 1:34:33 AM (8 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:
17d0f0e, aef9691
Parents:
7a83a47
Message:

python/tests/test_source.py: use nose2 params to process one sound file per test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_source.py

    r7a83a47 r980a4f4  
    2828class aubio_source_test_case(aubio_source_test_case_base):
    2929
    30     def test_close_file(self):
     30    @params(*list_of_sounds)
     31    def test_close_file(self, filename):
    3132        samplerate = 0 # use native samplerate
    3233        hop_size = 256
    33         for p in list_of_sounds:
    34             f = source(p, samplerate, hop_size)
    35             f.close()
     34        f = source(filename, samplerate, hop_size)
     35        f.close()
    3636
    37     def test_close_file_twice(self):
     37    @params(*list_of_sounds)
     38    def test_close_file_twice(self, filename):
    3839        samplerate = 0 # use native samplerate
    3940        hop_size = 256
    40         for p in list_of_sounds:
    41             f = source(p, samplerate, hop_size)
    42             f.close()
    43             f.close()
     41        f = source(filename, samplerate, hop_size)
     42        f.close()
     43        f.close()
    4444
    4545class aubio_source_read_test_case(aubio_source_test_case_base):
Note: See TracChangeset for help on using the changeset viewer.