Index: tests/pybin/settings.py
===================================================================
--- tests/pybin/settings.py	(revision d3c1c6a2d09e208e6187aaef54e5678e1218cbcf)
+++ tests/pybin/settings.py	(revision 5bf1f3ec95f7edb2d985f8c7335018402abe3593)
@@ -37,5 +37,5 @@
 	def __init__(self, arch):
 		try:
-			canonical_host = Architecture.makeCanonical( config.HOSTARCH )
+			canonical_host = Architecture.make_canonical( config.HOSTARCH )
 		except KeyError:
 			print("Unkown host architecture %s" % config.HOSTARCH, file=sys.stderr)
@@ -44,5 +44,5 @@
 		if arch:
 			try:
-				arch = Architecture.makeCanonical( arch )
+				arch = Architecture.make_canonical( arch )
 			except KeyError:
 				print("Unkown architecture %s" % arch, file=sys.stderr)
@@ -75,5 +75,5 @@
 
 	@classmethod
-	def makeCanonical(_, arch):
+	def make_canonical(_, arch):
 		return Architecture.KnownArchitectures[arch]
 
@@ -110,17 +110,17 @@
 	global install
 	global timeout
-	global width
+	global output_width
 
-	dry_run    = options.dry_run
-	generating = options.regenerate_expected
-	make       = 'make'
-	debug	     = Debug(options.debug)
-	install    = Install(options.install)
-	arch       = Architecture(options.arch)
-	timeout    = Timeouts(options.timeout, options.global_timeout)
-	width      = 24
+	dry_run      = options.dry_run
+	generating   = options.regenerate_expected
+	make         = 'make'
+	debug        = Debug(options.debug)
+	install      = Install(options.install)
+	arch         = Architecture(options.arch)
+	timeout      = Timeouts(options.timeout, options.global_timeout)
+	output_width = 24
 
 
-def updateMakeCmd(force, jobs):
+def update_make_cmd(force, jobs):
 	global make
 
@@ -141,4 +141,4 @@
 
 def prep_output(tests):
-	global width
-	width = max(map(lambda t: len(t.target()), tests))
+	global output_width
+	output_width = max(map(lambda t: len(t.target()), tests))
Index: tests/pybin/test_run.py
===================================================================
--- tests/pybin/test_run.py	(revision d3c1c6a2d09e208e6187aaef54e5678e1218cbcf)
+++ tests/pybin/test_run.py	(revision 5bf1f3ec95f7edb2d985f8c7335018402abe3593)
@@ -4,16 +4,4 @@
 
 import pybin.settings
-import datetime
-
-from string import Template
-
-class DeltaTemplate(Template):
-    delimiter = "%"
-
-def strfdelta(tdelta, fmt):
-    d["H"], rem = divmod(tdelta.seconds, 3600)
-    d["M"], d["S"] = divmod(rem, 60)
-    t = DeltaTemplate(fmt)
-    return t.substitute(**d)
 
 # Test class that defines what a test is
Index: tests/pybin/tools.py
===================================================================
--- tests/pybin/tools.py	(revision d3c1c6a2d09e208e6187aaef54e5678e1218cbcf)
+++ tests/pybin/tools.py	(revision 5bf1f3ec95f7edb2d985f8c7335018402abe3593)
@@ -55,4 +55,7 @@
 	return match.group(1).startswith("ASCII text")
 
+def is_exe(fname):
+	return os.path.isfile(fname) and os.access(fname, os.X_OK)
+
 # Remove 1 or more files silently
 def rm( files ):
@@ -79,19 +82,17 @@
 	# diff the output of the files
 	diff_cmd = ("diff --text "
-#				"--ignore-all-space "
-#				"--ignore-blank-lines "
-				"--old-group-format='\t\tmissing lines :\n"
-				"%%<' \\\n"
-				"--new-group-format='\t\tnew lines :\n"
-				"%%>' \\\n"
-				"--unchanged-group-format='%%=' \\"
-				"--changed-group-format='\t\texpected :\n"
-				"%%<"
-				"\t\tgot :\n"
-				"%%>\n' \\\n"
-				"--new-line-format='\t\t%%dn\t%%L' \\\n"
-				"--old-line-format='\t\t%%dn\t%%L' \\\n"
-				"--unchanged-line-format='' \\\n"
-				"%s %s")
+			"--old-group-format='\t\tmissing lines :\n"
+			"%%<' \\\n"
+			"--new-group-format='\t\tnew lines :\n"
+			"%%>' \\\n"
+			"--unchanged-group-format='%%=' \\"
+			"--changed-group-format='\t\texpected :\n"
+			"%%<"
+			"\t\tgot :\n"
+			"%%>\n' \\\n"
+			"--new-line-format='\t\t%%dn\t%%L' \\\n"
+			"--old-line-format='\t\t%%dn\t%%L' \\\n"
+			"--unchanged-line-format='' \\\n"
+			"%s %s")
 
 	# fetch return code and error from the diff command
@@ -115,8 +116,4 @@
 
 def which(program):
-    import os
-    def is_exe(fpath):
-        return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
-
     fpath, fname = os.path.split(program)
     if fpath:
@@ -160,24 +157,13 @@
 
 # helper function to check if a files contains only a specific string
-def fileContainsOnly(file, text) :
+def file_contains_only(file, text) :
 	with open(file) as f:
 		ff = f.read().strip()
 		result = ff == text.strip()
 
-		return result;
-
-# check whether or not a file is executable
-def fileIsExecutable(file) :
-	try :
-		fileinfo = os.stat(file)
-		return bool(fileinfo.st_mode & stat.S_IXUSR)
-	except Exception as inst:
-		print(type(inst))    # the exception instance
-		print(inst.args)     # arguments stored in .args
-		print(inst)
-		return False
+		return result
 
 # transform path to canonical form
-def canonicalPath(path):
+def canonical_path(path):
 	abspath = os.path.abspath(__main__.__file__)
 	dname = os.path.dirname(abspath)
@@ -185,15 +171,9 @@
 
 # compare path even if form is different
-def pathCmp(lhs, rhs):
-	return canonicalPath( lhs ) == canonicalPath( rhs )
+def path_cmp(lhs, rhs):
+	return canonical_path( lhs ) == canonical_path( rhs )
 
 # walk all files in a path
-def pathWalk( op ):
-	def step(_, dirname, names):
-		for name in names:
-			path = os.path.join(dirname, name)
-			op( path )
-
-	# Start the walk
+def path_walk( op ):
 	dname = settings.SRCDIR
 	for dirname, _, names in os.walk(dname):
@@ -206,5 +186,5 @@
 ################################################################################
 # count number of jobs to create
-def jobCount( options, tests ):
+def job_count( options, tests ):
 	# check if the user already passed in a number of jobs for multi-threading
 	if not options.jobs:
@@ -229,5 +209,5 @@
 
 # setup a proper processor pool with correct signal handling
-def setupPool(jobs):
+def setup_pool(jobs):
 	original_sigint_handler = signal.signal(signal.SIGINT, signal.SIG_IGN)
 	pool = multiprocessing.Pool(jobs)
@@ -261,5 +241,4 @@
 		return False
 	raise argparse.ArgumentTypeError(msg)
-	return False
 
 def fancy_print(text):
@@ -273,5 +252,5 @@
 
 
-def coreInfo(path):
+def core_info(path):
 	cmd   = os.path.join(settings.SRCDIR, "pybin/print-core.gdb")
 	if not os.path.isfile(cmd):
Index: tests/test.py
===================================================================
--- tests/test.py	(revision d3c1c6a2d09e208e6187aaef54e5678e1218cbcf)
+++ tests/test.py	(revision 5bf1f3ec95f7edb2d985f8c7335018402abe3593)
@@ -14,8 +14,8 @@
 ################################################################################
 
-def findTests():
+def find_tests():
 	expected = []
 
-	def matchTest(path):
+	def match_test(path):
 		match = re.search("^%s\/([\w\/\-_]*).expect\/([\w\-_]+)(\.[\w\-_]+)?\.txt$" % settings.SRCDIR, path)
 		if match :
@@ -27,12 +27,12 @@
 				expected.append(test)
 
-	pathWalk( matchTest )
+	path_walk( match_test )
 
 	return expected
 
 # reads the directory ./.expect and indentifies the tests
-def listTests( includes, excludes ):
+def list_tests( includes, excludes ):
 	# tests directly in the .expect folder will always be processed
-	test_list = findTests()
+	test_list = find_tests()
 
 	# if we have a limited number of includes, filter by them
@@ -51,5 +51,5 @@
 
 # from the found tests, filter all the valid tests/desired tests
-def validTests( options ):
+def valid_tests( options ):
 	tests = []
 
@@ -58,7 +58,7 @@
 	if options.regenerate_expected :
 		for testname in options.tests :
-			testname = canonicalPath( testname )
+			testname = canonical_path( testname )
 			if Test.valid_name(testname):
-				found = [test for test in allTests if canonicalPath( test.target() ) == testname]
+				found = [test for test in all_tests if canonical_path( test.target() ) == testname]
 				tests.append( found[0] if len(found) == 1 else Test.from_target(testname) )
 			else :
@@ -68,5 +68,5 @@
 		# otherwise we only need to validate that all tests are present in the complete list
 		for testname in options.tests:
-			test = [t for t in allTests if pathCmp( t.target(), testname )]
+			test = [t for t in all_tests if path_cmp( t.target(), testname )]
 
 			if test :
@@ -78,5 +78,5 @@
 
 # parses the option
-def getOptions():
+def parse_args():
 	# create a parser with the arguments for the tests script
 	parser = argparse.ArgumentParser(description='Script which runs cforall tests')
@@ -123,9 +123,6 @@
 	return val == 0 or settings.dry_run
 
-def isExe(file):
-	return settings.dry_run or fileIsExecutable(file)
-
-def noRule(file, target):
-	return not settings.dry_run and fileContainsOnly(file, "make: *** No rule to make target `%s'.  Stop." % target)
+def no_rule(file, target):
+	return not settings.dry_run and file_contains_only(file, "make: *** No rule to make target `%s'.  Stop." % target)
 
 # logic to run a single test and return the result (No handling of printing or other test framework logic)
@@ -150,5 +147,5 @@
 	if success(make_ret):
 		with Timed() as run_dur:
-			if isExe(exe_file):
+			if settings.dry_run or is_exe(exe_file):
 				# run test
 				retcode = run(exe_file, out_file, in_file)
@@ -162,5 +159,5 @@
 		if settings.generating :
 			# if we are ounly generating the output we still need to check that the test actually exists
-			if noRule(out_file, test.target()) :
+			if no_rule(out_file, test.target()) :
 				retcode = 1
 				error = "\t\tNo make target for test %s!" % test.target()
@@ -176,5 +173,5 @@
 			error = myfile.read()
 
-		ret, info = coreInfo(exe_file)
+		ret, info = core_info(exe_file)
 		error = error + info
 
@@ -190,5 +187,5 @@
 	with SignalHandling():
 		# print formated name
-		name_txt = '{0:{width}}  '.format(t.target(), width=settings.width)
+		name_txt = '{0:{width}}  '.format(t.target(), width=settings.output_width)
 
 		retcode, error, duration = run_single_test(t)
@@ -216,5 +213,5 @@
 
 	# create the executor for our jobs and handle the signal properly
-	pool = setupPool(jobs)
+	pool = setup_pool(jobs)
 
 	# for each test to run
@@ -246,5 +243,5 @@
 
 	# parse the command line arguments
-	options = getOptions()
+	options = parse_args()
 
 	# init global settings
@@ -252,14 +249,14 @@
 
 	# fetch the liest of all valid tests
-	allTests = listTests( options.include, options.exclude )
+	all_tests = list_tests( options.include, options.exclude )
 
 
 	# if user wants all tests than no other treatement of the test list is required
 	if options.all or options.list or options.list_comp or options.include :
-		tests = allTests
+		tests = all_tests
 
 	#otherwise we need to validate that the test list that was entered is valid
 	else :
-		tests = validTests( options )
+		tests = valid_tests( options )
 
 	# make sure we have at least some test to run
@@ -286,6 +283,6 @@
 		settings.validate()
 
-		options.jobs, forceJobs = jobCount( options, tests )
-		settings.updateMakeCmd(forceJobs, options.jobs)
+		options.jobs, forceJobs = job_count( options, tests )
+		settings.update_make_cmd(forceJobs, options.jobs)
 
 		print('%s (%s:%s) on %i cores' % (
