Changeset 0770148 for python


Ignore:
Timestamp:
Dec 19, 2018, 7:40:15 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
Children:
22d7902, 5f57ea9
Parents:
d0f19a7
Message:

[test] update pitchshift test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_pitchshift.py

    rd0f19a7 r0770148  
    22
    33from numpy.testing import TestCase
    4 from nose2.tools import params
     4from _tools import parametrize
    55import numpy as np
    66import aubio
     
    6767            aubio.pitchshift("default", -123)
    6868
    69 class aubio_pitchshift_testruns(TestCase):
     69class Test_aubio_pitchshift_testruns(object):
    7070
    71     @params(
     71    run_args = ['mode', 'pitchscale', 'hop_size', 'samplerate']
     72    run_values = [
    7273            ("default",     1.2,  128,  44100),
    7374            ("crispness:0", 0.43,  64,   8000),
     
    7576            ("crispness:3", 1.53, 512,   8000),
    7677            ("crispness:6", 2.3, 4096, 192000),
    77             )
     78            ]
     79
     80    @parametrize(run_args, run_values)
    7881    def test_run_with_params(self, mode, pitchscale, hop_size, samplerate):
    7982        try:
     
    98101
    99102if __name__ == '__main__':
    100     from nose2 import main
    101     main()
     103    from _tools import run_module_suite
     104    run_module_suite()
Note: See TracChangeset for help on using the changeset viewer.