shithub: aubio

Download patch

ref: 81f738e52677bc05b2c552ac74545be6792d576c
parent: fcb6e8c8b48b215994d2b07d803a773643123c4d
author: Paul Brossier <[email protected]>
date: Mon Feb 27 20:32:25 EST 2017

python/tests/test_sink.py: trivial test for sink 'with' interface (PEP 343)

--- a/python/tests/test_sink.py
+++ b/python/tests/test_sink.py
@@ -116,5 +116,12 @@
         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()