History

tests/test_musicutils.py: improve test

Paul Brossier committed 11 years ago

Commit 5e394ec1 parent 913a7f11 file · +16 −0Browse files

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

Unified · Split

python/tests/test_musicutils.py+16−0
@@ -8,6 +8,22 @@ class aubio_window(TestCase): · 7 unmodified lines
88 def test_accept_name_and_size(self):
99 window("default", 1024)
1010
11+ def test_fail_name_not_string(self):
12+ try:
13+ window(10, 1024)
14+ except ValueError, e:
15+ pass
16+ else:
17+ self.fail('non-string window type does not raise a ValueError')
18+
19+ def test_fail_size_not_int(self):
20+ try:
21+ window("default", "default")
22+ except ValueError, e:
23+ pass
24+ else:
25+ self.fail('non-integer window length does not raise a ValueError')
26+
1127 if __name__ == '__main__':
1228 from unittest import main
1329 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