Ignore:
Timestamp:
May 16, 2016, 5:08:18 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:
a6f9ebf
Parents:
58a5fb9
Message:

python/tests: fix most prospect warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_phasevoc.py

    r58a5fb9 r0b6d23d  
    33from numpy.testing import TestCase, assert_equal, assert_array_less
    44from aubio import fvec, cvec, pvoc, float_type
     5from nose2 import main
    56from nose2.tools import params
    67import numpy as np
     
    4142        f = pvoc (win_s, hop_s)
    4243        t = fvec (hop_s)
    43         for time in range( int ( 4 * win_s / hop_s ) ):
     44        for _ in range( int ( 4 * win_s / hop_s ) ):
    4445            s = f(t)
    4546            r = f.rdo(s)
     
    103104        zeros = fvec(hop_s)
    104105        r2 = f.rdo( f(sigin) )
    105         for i in range(1, ratio):
     106        for _ in range(1, ratio):
    106107            r2 = f.rdo( f(zeros) )
    107108        # compute square errors
     
    178179            with self.assertRaises(RuntimeError):
    179180                pvoc(win_s, hop_s)
    180         except AssertionError as e:
     181        except AssertionError:
    181182            # when compiled with fftw3, aubio supports non power of two fft sizes
    182183            self.skipTest('creating aubio.pvoc with size %d did not fail' % win_s)
    183184
    184185if __name__ == '__main__':
    185     from nose2 import main
    186186    main()
    187187
Note: See TracChangeset for help on using the changeset viewer.