[py] [test] make sure freq2note rounds to nearest integer midi note
authorPaul Brossier <piem@piem.org>
Mon, 29 Oct 2018 22:54:56 +0000 (23:54 +0100)
committerPaul Brossier <piem@piem.org>
Mon, 29 Oct 2018 22:54:56 +0000 (23:54 +0100)
python/tests/test_note2midi.py

index 261b025..d145ff1 100755 (executable)
@@ -111,10 +111,14 @@ class note2midi_wrong_values(unittest.TestCase):
 
 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
     nose2.main()