projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fcb6e8c
)
python/tests/test_sink.py: trivial test for sink 'with' interface (PEP 343)
author
Paul Brossier
<piem@piem.org>
Tue, 28 Feb 2017 00:32:25 +0000
(
01:32
+0100)
committer
Paul Brossier
<piem@piem.org>
Tue, 28 Feb 2017 00:32:25 +0000
(
01:32
+0100)
python/tests/test_sink.py
patch
|
blob
|
history
diff --git
a/python/tests/test_sink.py
b/python/tests/test_sink.py
index
6defbcf
..
c31564a
100755
(executable)
--- a/
python/tests/test_sink.py
+++ b/
python/tests/test_sink.py
@@
-116,5
+116,12
@@
class aubio_sink_test_case(TestCase):
g.close()
del_tmp_sink_path(sink_path)
g.close()
del_tmp_sink_path(sink_path)
+ def test_read_with(self):
+ sink_path =get_tmp_sink_path()
+ vec = fvec(128)
+ with sink(sink_path, samplerate) as g:
+ for i in range(10):
+ g(vec, 128)
+
if __name__ == '__main__':
main()
if __name__ == '__main__':
main()