diff 2.00/testcases.py @ 43:81f58c938ec5

Fixed the -s option
author Oleg Oshmyan <chortos@inbox.lv>
date Sun, 05 Dec 2010 15:37:35 +0100
parents 164395af969d
children
line wrap: on
line diff
--- a/2.00/testcases.py	Sun Dec 05 15:29:17 2010 +0100
+++ b/2.00/testcases.py	Sun Dec 05 15:37:35 2010 +0100
@@ -1,6 +1,8 @@
 #! /usr/bin/env python
 # Copyright (c) 2010 Chortos-2 <chortos@inbox.lv>
 
+# TODO: copy the ansfile if not options.erase even if no validator is used
+
 from __future__ import division, with_statement
 
 try:
@@ -353,7 +355,7 @@
 		case.open_infile()
 		case.time_started = None
 		if case.problem.config.stdio:
-			if options.erase and not case.validator:
+			if options.erase and not case.validator and case.problem.config.inname:
 				# TODO: re-use the same file name if possible
 				# FIXME: 2.5 lacks the delete parameter
 				with tempfile.NamedTemporaryFile(delete=False) as f: