History

python/tests/test_musicutils.py: simplify, check TypeError is raised

Paul Brossier committed 10 years ago

Commit 98e41061 parent ff89a061 file · +2 −10Browse files

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

Unified · Split

python/tests/test_musicutils.py+2−10
@@ -15,20 +15,12 @@ class aubio_window(TestCase): · 14 unmodified lines
15 window("default", 1024)15 window("default", 1024)
16 16
17 def test_fail_name_not_string(self):17 def test_fail_name_not_string(self):
18 try:18 with self.assertRaises(TypeError):
19 window(10, 1024)19 window(10, 1024)
20 except ValueError as e:
21 pass
22 else:
23 self.fail('non-string window type does not raise a ValueError')
24 20
25 def test_fail_size_not_int(self):21 def test_fail_size_not_int(self):
26 try:22 with self.assertRaises(TypeError):
27 window("default", "default")23 window("default", "default")
28 except ValueError as e:
29 pass
30 else:
31 self.fail('non-integer window length does not raise a ValueError')
32 24
33 def test_compute_hanning_1024(self):25 def test_compute_hanning_1024(self):
34 size = 102426 size = 1024

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