History

Merge branch 'feature/note2freq'

Paul Brossier committed 8 years ago

Commit cefa29d2 parents 7be77bb 27ed5462 files · +7 −4Browse files

Showing the changes to python (1 of 2 files). Show all

Unified · Split

python/tests/test_note2midi.py+5−2
@@ -3,7 +3,7 @@ · 2 unmodified lines
33
44 from __future__ import unicode_literals
55
6−from aubio import note2midi, freq2note, note2freq
6+from aubio import note2midi, freq2note, note2freq, float_type
77 from nose2.tools import params
88 import unittest
99
@@ -127,7 +127,10 @@ class note2freq_simple_test(unittest.TestCase): · 117 unmodified lines
127127
128128 def test_note2freq_under(self):
129129 " make sure note2freq(A4) == 440"
130− self.assertEqual(440, note2freq("A4"))
130+ if float_type == 'float32':
131+ self.assertEqual(440, note2freq("A4"))
132+ else:
133+ self.assertLess(abs(note2freq("A4")-440), 1.e-12)
131134
132135 if __name__ == '__main__':
133136 import nose2

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t