This commit is contained in:
Egor Matveev 2022-02-25 16:44:38 +03:00
parent 44ee8f15b7
commit c82fc75f70

View File

@ -120,12 +120,12 @@ class BaseTester:
).text.strip().replace('\r\n', '\n')
print('predicted:', self.predicted)
self.solution.test = int(test.filename)
self.solution.extras[test.filename] = {'predicted': test.text, 'output': ''}
self.solution.save()
try:
with Timer(self.solution, test.filename) as timer:
self.test(test.filename)
finally:
self.solution.extras[test.filename]['predicted'] = test.text
if exists(join(self.path, "output.txt")):
try:
self.solution.extras[test.filename]['output'] = open(join(self.path, 'output.txt'), 'r').read()