tests: move to root directory

This commit is contained in:
Roman Zeyde
2014-08-05 09:22:51 +03:00
parent d94675e7d7
commit 83d6a355b5
6 changed files with 0 additions and 0 deletions

22
tests/test_stream.py Normal file
View File

@@ -0,0 +1,22 @@
import stream
import wave
def test():
p = wave.record('-', stdout=wave.sp.PIPE)
f = stream.Reader(p.stdout)
result = zip(range(10), f)
p.stop()
j = 0
for i, buf in result:
assert i == j
assert len(buf) == f.SAMPLES
j += 1
try:
for buf in f:
pass
except IOError as e:
assert str(e) == 'timeout'