Changeset 0b6d23d for python/tests/test_mathutils.py
- Timestamp:
- May 16, 2016, 5:08:18 AM (8 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_mathutils.py
r58a5fb9 r0b6d23d 1 1 #! /usr/bin/env python 2 2 3 from unittest import main 3 4 from numpy.testing import TestCase, assert_equal 4 5 from numpy import array, arange, isnan, isinf … … 24 25 unwrap2pi(a) 25 26 a = pi/100. * arange(-600,600).astype("float") 26 b = unwrap2pi(a)27 unwrap2pi(a) 27 28 #print zip(a, b) 28 29 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.]) 33 33 34 34 def test_unwrap2pi_takes_fvec(self): … … 102 102 103 103 if __name__ == '__main__': 104 from unittest import main105 104 main()
Note: See TracChangeset
for help on using the changeset viewer.