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_mathutils.py

    r58a5fb9 r0b6d23d  
    11#! /usr/bin/env python
    22
     3from unittest import main
    34from numpy.testing import TestCase, assert_equal
    45from numpy import array, arange, isnan, isinf
     
    2425        unwrap2pi(a)
    2526        a = pi/100. * arange(-600,600).astype("float")
    26         b = unwrap2pi (a)
     27        unwrap2pi(a)
    2728        #print zip(a, b)
    2829
    29         try:
    30             print (unwrap2pi(["23.","24.",25.]))
    31         except Exception as e:
    32             pass
     30    def test_unwrap2pi_fails_on_list(self):
     31        with self.assertRaises(TypeError):
     32            unwrap2pi(["23.","24.",25.])
    3333
    3434    def test_unwrap2pi_takes_fvec(self):
     
    102102
    103103if __name__ == '__main__':
    104     from unittest import main
    105104    main()
Note: See TracChangeset for help on using the changeset viewer.