Changeset 099237f
 Timestamp:
 Jun 21, 2019, 2:05:10 PM (8 months ago)
 Branches:
 feature/autosink, feature/timestretch, master
 Children:
 e3fde21
 Parents:
 f912e90
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

python/tests/test_hztomel.py
rf912e90 r099237f 5 5 from numpy.testing import assert_equal, assert_almost_equal 6 6 from _tools import assert_warns 7 from utils import is32bit 7 8 import numpy as np 8 9 import aubio … … 10 11 from aubio import hztomel, meltohz 11 12 from aubio import hztomel_htk, meltohz_htk 12 13 13 14 14 class aubio_hztomel_test_case(TestCase): … … 18 18 assert_almost_equal(hztomel(400. / 3.), 2., decimal=5) 19 19 assert_almost_equal(hztomel(1000. / 3), 5.) 20 assert_equal(hztomel(200.), 3.) 20 # on 32bit, some of these tests fails unless compiling with ffloatstore 21 try: 22 assert_equal(hztomel(200.), 3.) 23 except AssertionError: 24 if not is32bit(): raise 25 assert_almost_equal(hztomel(200.), 3., decimal=5) 21 26 assert_almost_equal(hztomel(1000.), 15) 22 27 assert_almost_equal(hztomel(6400), 42, decimal=5) … … 29 34 assert_equal(meltohz(0.), 0.) 30 35 assert_almost_equal(meltohz(2), 400. / 3., decimal=4) 31 assert_equal(meltohz(3.), 200.) 36 try: 37 assert_equal(meltohz(3.), 200.) 38 except AssertionError: 39 if not is32bit(): raise 40 assert_almost_equal(meltohz(3.), 200., decimal=5) 32 41 assert_almost_equal(meltohz(5), 1000. / 3., decimal=4) 33 42 assert_almost_equal(meltohz(15), 1000., decimal=4)
Note: See TracChangeset
for help on using the changeset viewer.