projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ff89a06
)
python/tests/test_musicutils.py: simplify, check TypeError is raised
author
Paul Brossier
<piem@piem.org>
Fri, 13 May 2016 15:54:49 +0000
(17:54 +0200)
committer
Paul Brossier
<piem@piem.org>
Fri, 13 May 2016 15:54:49 +0000
(17:54 +0200)
python/tests/test_musicutils.py
patch
|
blob
|
history
diff --git
a/python/tests/test_musicutils.py
b/python/tests/test_musicutils.py
index
8c96c94
..
c0c81dc
100755
(executable)
--- a/
python/tests/test_musicutils.py
+++ b/
python/tests/test_musicutils.py
@@
-15,20
+15,12
@@
class aubio_window(TestCase):
window("default", 1024)
def test_fail_name_not_string(self):
window("default", 1024)
def test_fail_name_not_string(self):
-
try
:
+
with self.assertRaises(TypeError)
:
window(10, 1024)
window(10, 1024)
- except ValueError as e:
- pass
- else:
- self.fail('non-string window type does not raise a ValueError')
def test_fail_size_not_int(self):
def test_fail_size_not_int(self):
-
try
:
+
with self.assertRaises(TypeError)
:
window("default", "default")
window("default", "default")
- except ValueError as e:
- pass
- else:
- self.fail('non-integer window length does not raise a ValueError')
def test_compute_hanning_1024(self):
size = 1024
def test_compute_hanning_1024(self):
size = 1024