comparison testcases.py @ 79:ee8a99dcaaed

Renamed configuration variable tasknames to problems
author Oleg Oshmyan <chortos@inbox.lv>
date Mon, 17 Jan 2011 11:11:01 +0000
parents 69eadc60f4e2
children 24752db487c5
comparison
equal deleted inserted replaced
78:d46bd7ee3e69 79:ee8a99dcaaed
577 contextmgr = CopyDeleting(case, case.infile, inputdatafname) 577 contextmgr = CopyDeleting(case, case.infile, inputdatafname)
578 else: 578 else:
579 inputdatafname = case.problem.config.inname 579 inputdatafname = case.problem.config.inname
580 contextmgr = Copying(case.infile, inputdatafname) 580 contextmgr = Copying(case.infile, inputdatafname)
581 with contextmgr: 581 with contextmgr:
582 # FIXME: this U doesn't do anything good for the child process, does it? 582 with open(inputdatafname) as infile:
583 with open(inputdatafname, 'rU') as infile:
584 with tempfile.TemporaryFile('w+') if options.erase and not case.validator else open(case.problem.config.outname, 'w+') as outfile: 583 with tempfile.TemporaryFile('w+') if options.erase and not case.validator else open(case.problem.config.outname, 'w+') as outfile:
585 if call is not None: 584 if call is not None:
586 call(case.problem.config.path, case=case, stdin=infile, stdout=outfile, stderr=devnull, universal_newlines=True, bufsize=-1, preexec_fn=preexec_fn) 585 call(case.problem.config.path, case=case, stdin=infile, stdout=outfile, stderr=devnull, universal_newlines=True, bufsize=-1, preexec_fn=preexec_fn)
587 else: 586 else:
588 try: 587 try: