History

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

Paul Brossier committed 9 years ago

Commit 81f738e1 parent fcb6e8c1 file · +7 −0Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/tests/test_sink.py+7−0
@@ -116,5 +116,12 @@ class aubio_sink_test_case(TestCase): · 115 unmodified lines
116116 g.close()
117117 del_tmp_sink_path(sink_path)
118118
119+ def test_read_with(self):
120+ sink_path =get_tmp_sink_path()
121+ vec = fvec(128)
122+ with sink(sink_path, samplerate) as g:
123+ for i in range(10):
124+ g(vec, 128)
125+
119126 if __name__ == '__main__':
120127 main()

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t