]> git.parisson.com Git - timeside.git/commitdiff
tests/testdecoding.py: use release()
authorPaul Brossier <piem@piem.org>
Wed, 1 Aug 2012 18:54:48 +0000 (12:54 -0600)
committerPaul Brossier <piem@piem.org>
Wed, 1 Aug 2012 18:54:48 +0000 (12:54 -0600)
tests/testdecoding.py

index 45c787c7eb96165844414fab86743a1eceffa8ec..042c964dc23f31bdb1ed525cd68053bc13abfc09 100644 (file)
@@ -3,8 +3,6 @@ from unit_timeside import *
 
 import os.path
 
-__all__ = ['TestDecoding']
-
 class TestDecoding(TestCase):
     "Test the low level streaming features"
 
@@ -36,7 +34,9 @@ class TestDecoding(TestCase):
         while True:
             frames, eod = decoder.process()
             totalframes += frames.shape[0]
-            if eod: break
+            if eod or decoder.eod: break
+
+        decoder.release()
 
         # FIXME compute actual number of frames from file
         if os.path.splitext(self.source)[-1].lower() == '.mp3':
@@ -48,5 +48,3 @@ class TestDecoding(TestCase):
 
 if __name__ == '__main__':
     unittest.main(testRunner=TestRunner())
-
-