diff upreckon/testcases.py @ 208:ede78fbd509a

Revamped files.File This changes (simplifies) file search path: * when searching for testconf, .../testconf.py is now given precendence over .../tests/testconf.py; * when searching inside archives, a/tests/b/c is now given precedence over a/c.
author Oleg Oshmyan <chortos@inbox.lv>
date Thu, 18 Aug 2011 02:20:24 +0300
parents 4edb6ef5a676
children ce1285728952
line wrap: on
line diff
--- a/upreckon/testcases.py	Thu Aug 18 01:19:15 2011 +0300
+++ b/upreckon/testcases.py	Thu Aug 18 02:20:24 2011 +0300
@@ -146,14 +146,14 @@
 	
 	def open_infile(case):
 		try:
-			case.infile = files.File('/'.join((case.problem.name, case.realinname.replace('$', case.id))))
+			case.infile = files.File.from_virtual_path('/'.join((case.problem.name, case.realinname.replace('$', case.id))), False, 'test data')
 		except IOError:
 			e = sys.exc_info()[1]
 			raise CannotReadInputFile(e)
 	
 	def open_outfile(case):
 		try:
-			case.outfile = files.File('/'.join((case.problem.name, case.realoutname.replace('$', case.id))))
+			case.outfile = files.File.from_virtual_path('/'.join((case.problem.name, case.realoutname.replace('$', case.id))), False, 'test data')
 		except IOError:
 			e = sys.exc_info()[1]
 			raise CannotReadAnswerFile(e)