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/tests (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
111 111
112class freq2note_simple_test(unittest.TestCase):112class freq2note_simple_test(unittest.TestCase):
113 113
114 def test_freq2note(self):114 def test_freq2note_above(self):
115 " make sure freq2note(441) == A4 "115 " make sure freq2note(441) == A4 "
116 self.assertEqual("A4", freq2note(441))116 self.assertEqual("A4", freq2note(441))
117 117
118 def test_freq2note_under(self):
119 " make sure freq2note(439) == A4 "
120 self.assertEqual("A4", freq2note(439))
121
118if __name__ == '__main__':122if __name__ == '__main__':
119 import nose2123 import nose2
120 nose2.main()124 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