From: Paul Brossier Date: Thu, 18 Feb 2010 00:48:22 +0000 (+0000) Subject: tests/api/test_lolevel.py: add option to pass a filename on the command line X-Git-Tag: 0.3.2~191 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=68f243d6e21439e94460bf7fffd9ea1c57742fb5;p=timeside.git tests/api/test_lolevel.py: add option to pass a filename on the command line --- diff --git a/tests/api/test_lolevel.py b/tests/api/test_lolevel.py index d2d75be..8f34b93 100644 --- a/tests/api/test_lolevel.py +++ b/tests/api/test_lolevel.py @@ -1,7 +1,11 @@ from timeside.tests.api import examples -import os.path -source= os.path.join (os.path.dirname(__file__), "../samples/guitar.wav") +import sys +if len(sys.argv) > 1: + source = sys.argv[1] +else: + import os.path + source= os.path.join (os.path.dirname(__file__), "../samples/guitar.wav") Decoder = examples.FileDecoder print "Creating decoder with id=%s for: %s" % (Decoder.id(), source)