comparison testcases.py @ 130:652028850ea4

Removed useless arguments to call() from testcases.BatchTestCase.test()
author Oleg Oshmyan <chortos@inbox.lv>
date Thu, 19 May 2011 02:21:33 +0100
parents 42c8f5c152a5
children e84f33a60a5c
comparison
equal deleted inserted replaced
129:580f0f4687c3 130:652028850ea4
312 inputdatafname = case.problem.config.inname 312 inputdatafname = case.problem.config.inname
313 contextmgr = Copying(case.infile, inputdatafname) 313 contextmgr = Copying(case.infile, inputdatafname)
314 with contextmgr: 314 with contextmgr:
315 with open(inputdatafname) as infile: 315 with open(inputdatafname) as infile:
316 with tempfile.TemporaryFile('w+') if options.erase and (not case.validator or callable(case.validator)) else open(case.problem.config.outname, 'w+') as outfile: 316 with tempfile.TemporaryFile('w+') if options.erase and (not case.validator or callable(case.validator)) else open(case.problem.config.outname, 'w+') as outfile:
317 call(case.problem.config.path, case=case, stdin=infile, stdout=outfile, stderr=devnull, universal_newlines=True, bufsize=-1) 317 call(case.problem.config.path, case=case, stdin=infile, stdout=outfile, stderr=devnull)
318 if config.globalconf.force_zero_exitcode and case.process.returncode or case.process.returncode < 0: 318 if config.globalconf.force_zero_exitcode and case.process.returncode or case.process.returncode < 0:
319 raise NonZeroExitCode(case.process.returncode) 319 raise NonZeroExitCode(case.process.returncode)
320 case.has_called_back = True 320 case.has_called_back = True
321 callback() 321 callback()
322 outfile.seek(0) 322 outfile.seek(0)