Changeset 5d8cc71


Ignore:
Timestamp:
Aug 21, 2016, 12:45:04 PM (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:
857fe7ff
Parents:
6a72ff0
Message:

python/tests/utils.py: by default, use 5 seconds brownoise

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/utils.py

    r6a72ff0 r5d8cc71  
    55import numpy as np
    66from tempfile import mkstemp
     7
     8DEFAULT_SOUND = '22050Hz_5s_brownnoise.wav'
    79
    810def array_from_text_file(filename, dtype = 'float'):
     
    2224        TestCase.skipTest("please add some sounds in \'python/tests/sounds\'")
    2325    else:
    24         return all_sounds[0]
     26        default_sound = all_sounds[0]
     27        if DEFAULT_SOUND in map(os.path.basename, all_sounds):
     28            while os.path.basename(default_sound) != DEFAULT_SOUND:
     29                default_sound = all_sounds.pop(0)
     30        return default_sound
    2531
    2632def get_tmp_sink_path():
Note: See TracChangeset for help on using the changeset viewer.