From 786cd38c0a1cfeff96e5c755852a7e1c7f5e7d75 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 21 Feb 2007 06:33:13 +0000 Subject: * Indentation changes - 4 spaces for python, we standardized this before (and it's a PEP) * Modified some sync tests --- pactest/pactest.py | 67 +++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 33 deletions(-) (limited to 'pactest/pactest.py') diff --git a/pactest/pactest.py b/pactest/pactest.py index 2f7358ac..d9227ba4 100755 --- a/pactest/pactest.py +++ b/pactest/pactest.py @@ -32,42 +32,43 @@ __version__ = "0.3" def usage(retcode): - """ - """ - print "Usage: %s [options] [[--test=] ...]\n\n" % __file__ - sys.exit(retcode) + """ + """ + print "Usage: %s [options] [[--test=] ...]\n\n" % __file__ + sys.exit(retcode) if __name__ == "__main__": - env = pmenv.pmenv() - testcases = [] + env = pmenv.pmenv() + testcases = [] - try: - opts, args = getopt.getopt(sys.argv[1:], - "d:hp:t:v", - ["debug=", "gdb", "help", "pacman=", "test=", "valgrind", "verbose", "nolog"]) - except getopt.GetoptError: - usage(1) + try: + opts, args = getopt.getopt(sys.argv[1:], + "d:hp:t:v", + ["debug=", "gdb", "help", "pacman=", "test=", "valgrind", "verbose", "nolog"]) + except getopt.GetoptError: + usage(1) - for (cmd, param) in opts: - if cmd == "-v" or cmd == "--verbose": - util.verbose += 1 - elif cmd == "-d" or cmd == "--debug": - env.pacman["debug"] = int(param) - elif cmd == "-t" or cmd == "--test": - testcases.extend(glob.glob(param)) - elif cmd == "-p" or cmd == "--pacman": - env.pacman["bin"] = os.path.abspath(param) - elif cmd == "-h" or cmd == "--help": - usage(0) - elif cmd == "--nolog": - env.pacman["nolog"] = 1 - elif cmd == "--gdb": - env.pacman["gdb"] = 1 - elif cmd == "--valgrind": - env.pacman["valgrind"] = 1 + for (cmd, param) in opts: + if cmd == "-v" or cmd == "--verbose": + util.verbose += 1 + elif cmd == "-d" or cmd == "--debug": + env.pacman["debug"] = int(param) + elif cmd == "-t" or cmd == "--test": + testcases.extend(glob.glob(param)) + elif cmd == "-p" or cmd == "--pacman": + env.pacman["bin"] = os.path.abspath(param) + elif cmd == "-h" or cmd == "--help": + usage(0) + elif cmd == "--nolog": + env.pacman["nolog"] = 1 + elif cmd == "--gdb": + env.pacman["gdb"] = 1 + elif cmd == "--valgrind": + env.pacman["valgrind"] = 1 - for i in testcases: - env.addtest(i) + for i in testcases: + env.addtest(i) - env.run() - env.results() + env.run() + env.results() +# vim: set ts=4 sw=4 et: -- cgit v1.2.3