From 81f738e52677bc05b2c552ac74545be6792d576c Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Tue, 28 Feb 2017 01:32:25 +0100 Subject: [PATCH] python/tests/test_sink.py: trivial test for sink 'with' interface (PEP 343) --- python/tests/test_sink.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/tests/test_sink.py b/python/tests/test_sink.py index 6defbcf0..c31564a2 100755 --- 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) + 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() -- 2.11.0