From 68f243d6e21439e94460bf7fffd9ea1c57742fb5 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 18 Feb 2010 00:48:22 +0000 Subject: [PATCH] tests/api/test_lolevel.py: add option to pass a filename on the command line --- tests/api/test_lolevel.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) -- 2.39.5