 Timestamp:
 Nov 17, 2018, 6:46:47 PM (5 months ago)
 Branches:
 feature/autosink, feature/constantq, feature/pitchshift, feature/timestretch, master
 Children:
 ff28d81
 Parents:
 a95b386
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

python/tests/test_hztomel.py
ra95b386 rab8e838 4 4 from numpy.testing import TestCase 5 5 from numpy.testing import assert_equal, assert_almost_equal 6 from _tools import assert_warns 6 7 import numpy as np 7 8 import aubio … … 38 39 39 40 def test_meltohz_negative(self): 40 # TODO add assert_warns41 assert_equal(meltohz(1), 0)41 with assert_warns(UserWarning): 42 assert_equal(meltohz(1), 0) 42 43 43 44 def test_hztomel_negative(self): 44 # TODO add assert_warns45 assert_equal(hztomel(1), 0)45 with assert_warns(UserWarning): 46 assert_equal(hztomel(1), 0) 46 47 47 48 … … 58 59 59 60 def test_meltohz_negative(self): 60 # TODO add assert_warns61 assert_equal(meltohz(1, htk=True), 0)61 with assert_warns(UserWarning): 62 assert_equal(meltohz(1, htk=True), 0) 62 63 assert_almost_equal(meltohz(2000, htk=True), 3428.7, decimal=1) 63 64 assert_almost_equal(meltohz(1000, htk=True), 1000., decimal=1) 64 65 65 66 def test_hztomel_negative(self): 66 # TODO add assert_warns 67 assert_equal(hztomel(1, htk=True), 0) 67 with assert_warns(UserWarning): 68 assert_equal(meltohz(1, htk=True), 0) 69 with assert_warns(UserWarning): 70 assert_equal(hztomel(1, htk=True), 0) 68 71 assert_almost_equal(hztomel(1000, htk=True), 1000., decimal=1) 69 72
Note: See TracChangeset
for help on using the changeset viewer.