From 3d14596042c75b80994f636bcb7666e76bfeca85 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Fri, 15 Mar 2013 13:50:00 -0400 Subject: Allow run-tests script options and args to be passed through to nose. --- run-tests.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/run-tests.py b/run-tests.py index a2e6d13..7756e4d 100755 --- a/run-tests.py +++ b/run-tests.py @@ -3,12 +3,10 @@ import tests import os, sys, getopt -opts, args = getopt.getopt(sys.argv[1:], '') - -if args and args[0] == "update": - if len(args) > 1: - config = tests.get_config(os.path.dirname(args[1])) - root, ext = os.path.splitext(args[1]) +if len(sys.argv) > 1 and sys.argv[1] == "update": + if len(sys.argv) > 2: + config = tests.get_config(os.path.dirname(sys.argv[2])) + root, ext = os.path.splitext(sys.argv[2]) if ext == config.get(tests.get_section(os.path.basename(root), config), 'input_ext'): tests.generate(root, config) else: -- cgit v1.2.3