History

[py] [test] make sure freq2note rounds to nearest integer midi note

Paul Brossier committed 8 years ago

Commit 4afeac21 parent 40136171 file · +5 −1Browse files

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

Unified · Split

python/tests/test_note2midi.py+5−1
@@ -111,10 +111,14 @@ class note2midi_wrong_values(unittest.TestCase): · 110 unmodified lines
111111
112112 class freq2note_simple_test(unittest.TestCase):
113113
114− def test_freq2note(self):
114+ def test_freq2note_above(self):
115115 " make sure freq2note(441) == A4 "
116116 self.assertEqual("A4", freq2note(441))
117117
118+ def test_freq2note_under(self):
119+ " make sure freq2note(439) == A4 "
120+ self.assertEqual("A4", freq2note(439))
121+
118122 if __name__ == '__main__':
119123 import nose2
120124 nose2.main()

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