ref: 4afeac2e223f4f13d2d754cee9dc41fc02103f85
parent: 40136171dbc5df8e7809fa24cb8f43dfc52df38d
author: Paul Brossier <piem@piem.org>
date: Mon Oct 29 19:54:56 EDT 2018
[py] [test] make sure freq2note rounds to nearest integer midi note
--- a/python/tests/test_note2midi.py
+++ b/python/tests/test_note2midi.py
@@ -111,9 +111,13 @@
class freq2note_simple_test(unittest.TestCase):
- def test_freq2note(self):
+ def test_freq2note_above(self):
" make sure freq2note(441) == A4 "
self.assertEqual("A4", freq2note(441))
+
+ def test_freq2note_under(self):
+ " make sure freq2note(439) == A4 "
+ self.assertEqual("A4", freq2note(439))
if __name__ == '__main__':
import nose2