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
55 from aubio import notes
66
77 AUBIO_DEFAULT_NOTES_SILENCE = -70.
8+AUBIO_DEFAULT_NOTES_RELEASE_DROP = 10.
89 AUBIO_DEFAULT_NOTES_MINIOI_MS = 30.
910
1011 class aubio_notes_default(TestCase):
@@ -38,6 +39,19 @@ class aubio_notes_params(TestCase): · 27 unmodified lines
3839 self.o.set_silence(val)
3940 assert_equal (self.o.get_silence(), val)
4041
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+
4155 from .utils import list_all_sounds
4256 list_of_sounds = list_all_sounds('sounds')
4357

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