History

python/tests/test_notes.py: test notes.set/get_release_drop

Paul Brossier committed 8 years ago

Commit f8c54521 parent 6bba1391 file · +14 −0Browse files

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

Unified · Split

python/tests/test_notes.py+14−0
@@ -5,6 +5,7 @@ from numpy.testing import TestCase, assert_equal, assert_almost_equal · 4 unmodified lines
5from aubio import notes5from aubio import notes
6 6
7AUBIO_DEFAULT_NOTES_SILENCE = -70.7AUBIO_DEFAULT_NOTES_SILENCE = -70.
8AUBIO_DEFAULT_NOTES_RELEASE_DROP = 10.
8AUBIO_DEFAULT_NOTES_MINIOI_MS = 30.9AUBIO_DEFAULT_NOTES_MINIOI_MS = 30.
9 10
10class aubio_notes_default(TestCase):11class aubio_notes_default(TestCase):
@@ -38,6 +39,19 @@ class aubio_notes_params(TestCase): · 27 unmodified lines
38 self.o.set_silence(val)39 self.o.set_silence(val)
39 assert_equal (self.o.get_silence(), val)40 assert_equal (self.o.get_silence(), val)
40 41
42 def test_get_release_drop(self):
43 assert_equal (self.o.get_release_drop(), AUBIO_DEFAULT_NOTES_RELEASE_DROP)
44
45 def test_set_release_drop(self):
46 val = 50
47 self.o.set_release_drop(val)
48 assert_equal (self.o.get_release_drop(), val)
49
50 def test_set_release_drop_wrong(self):
51 val = -10
52 with self.assertRaises(ValueError):
53 self.o.set_release_drop(val)
54
41from .utils import list_all_sounds55from .utils import list_all_sounds
42list_of_sounds = list_all_sounds('sounds')56list_of_sounds = list_all_sounds('sounds')
43 57

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