diff test.py @ 3:cd4304ff1d1b

Minor changes
author Oleg Oshmyan <chortos@inbox.lv>
date Fri, 22 Jan 2010 20:16:07 +0000
parents bddcc05aba59
children 06eef313aeaa
line wrap: on
line diff
--- a/test.py	Fri Jan 22 19:48:24 2010 +0000
+++ b/test.py	Fri Jan 22 20:16:07 2010 +0000
@@ -1,5 +1,5 @@
 #! /usr/bin/python
-# Copyright (c) 2009 Chortos-2 <chortos@inbox.lv>
+# Copyright (c) 2009-2010 Chortos-2 <chortos@inbox.lv>
 
 import os, sys, shutil, time, subprocess, filecmp, optparse, signal, tempfile, tarfile, zipfile
 
@@ -256,7 +256,7 @@
 	if f:
 		return f
 	if cwd:
-		if os.path.isfile(os.path.join(oldcwd, 'tests', cwd, name):
+		if os.path.isfile(os.path.join(oldcwd, 'tests', cwd, name)):
 			return open(os.path.join(oldcwd, 'tests', cwd, name), 'rU')
 		elif os.path.isfile(os.path.join(oldcwd, 'tests', name)):
 			return open(os.path.join(oldcwd, 'tests', name), 'rU')
@@ -376,7 +376,7 @@
 	cwd = ''
 	if os.path.isdir(taskname):
 		os.chdir(taskname)
-		if taskname != :
+		if taskname != os.path.curdir:
 			cwd = taskname
 		try:
 			execfile('testconf.py', globals())
@@ -524,7 +524,7 @@
 		except NameError, error:
 			if os.name == 'posix':
 				pause = 'read -s -n 1'
-				print 'Configuration ' + str(error).replace('name ', 'variable ') + '; it was devised automatically but the choice might be incorrect, so test.py might exit immediately after the testing is complete.'
+				print 'Configuration ' + str(error).replace('name ', 'variable ') + '; it was devised automatically but the choice might be incorrect, so test.py might exit immediately after the testing is completed.'
 			elif os.name == 'nt':
 				pause = 'pause'
 			else: