Changeset e9a4402 for python


Ignore:
Timestamp:
Oct 30, 2018, 12:54:33 AM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
476cb41
Parents:
6f944b5
Message:

[py] test note2freq

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_note2midi.py

    r6f944b5 re9a4402  
    44from __future__ import unicode_literals
    55
    6 from aubio import note2midi, freq2note
     6from aubio import note2midi, freq2note, note2freq
    77from nose2.tools import params
    88import unittest
     
    120120        self.assertEqual("A4", freq2note(439))
    121121
     122class note2freq_simple_test(unittest.TestCase):
     123
     124    def test_note2freq(self):
     125        " make sure note2freq('A3') == 220"
     126        self.assertEqual(220, note2freq("A3"))
     127
     128    def test_note2freq_under(self):
     129        " make sure note2freq(A4) == 440"
     130        self.assertEqual(440, note2freq("A4"))
     131
    122132if __name__ == '__main__':
    123133    import nose2
Note: See TracChangeset for help on using the changeset viewer.