From: Paul Brossier Date: Mon, 29 Oct 2018 22:54:56 +0000 (+0100) Subject: [py] [test] make sure freq2note rounds to nearest integer midi note X-Git-Tag: 0.4.8~92^2~5 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=4afeac2e223f4f13d2d754cee9dc41fc02103f85;p=aubio.git [py] [test] make sure freq2note rounds to nearest integer midi note --- diff --git a/python/tests/test_note2midi.py b/python/tests/test_note2midi.py index 261b025b..d145ff17 100755 --- a/python/tests/test_note2midi.py +++ b/python/tests/test_note2midi.py @@ -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()