projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
37c7e61
)
[tests] check reading source after close raises RuntimeError
author
Paul Brossier
<piem@piem.org>
Fri, 21 Dec 2018 15:22:27 +0000
(16:22 +0100)
committer
Paul Brossier
<piem@piem.org>
Fri, 21 Dec 2018 15:22:27 +0000
(16:22 +0100)
python/tests/test_source.py
patch
|
blob
|
history
diff --git
a/python/tests/test_source.py
b/python/tests/test_source.py
index
6d88c62
..
9d2e61f
100755
(executable)
--- a/
python/tests/test_source.py
+++ b/
python/tests/test_source.py
@@
-40,6
+40,19
@@
class Test_aubio_source_test_case(object):
f.close()
f.close()
f.close()
f.close()
+ @parametrize('filename', [default_test_sound])
+ def test_read_after_close(self, filename):
+ samplerate = 0 # use native samplerate
+ hop_size = 256
+ f = source(filename, samplerate, hop_size)
+ read, frames = f()
+ f.close()
+ with assert_raises(RuntimeError):
+ read, frames = f()
+ with assert_raises(RuntimeError):
+ read, frames = f.do_multi()
+
+
class Test_aubio_source_read(object):
def read_from_source(self, f):
class Test_aubio_source_read(object):
def read_from_source(self, f):