changeset 9:ed90b375d197

Award maxexitcode points by default The default number of points allocated per test case is now maxexitcode if it is set and is an integer (so that all given points are integers as well).
author Oleg Oshmyan <chortos@inbox.lv>
date Sun, 14 Feb 2010 00:51:27 +0000
parents ddc9aa02007b
children c87ec78f1fae
files test.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test.py	Sun Feb 14 00:24:13 2010 +0000
+++ b/test.py	Sun Feb 14 00:51:27 2010 +0000
@@ -618,6 +618,9 @@
 	
 	pointmap = newpointmap
 	
+	if not tester:
+		maxexitcode = 0
+	
 	if maxtime > 0:
 		strmaxtime = '/%.3f' % maxtime
 	else:
@@ -701,7 +704,7 @@
 					s = s.zfill(paddummieswithzeroestolength)
 				spref = 'sample '
 			else:
-				npoints = pointmap.get(None, 1)
+				npoints = pointmap.get(None, maxexitcode if maxexitcode and isinstance(maxexitcode, int) else 1)
 				npoints = pointmap.get(i, npoints)
 				maxpointsgrp += npoints
 				if npoints: