logs
This commit is contained in:
parent
324b229321
commit
c1cbdf33a9
@ -41,6 +41,7 @@ class BaseTester:
|
|||||||
result = open(join(self.solution.testing_directory, "output.txt"), "r").read().strip().replace('\r\n', '\n')
|
result = open(join(self.solution.testing_directory, "output.txt"), "r").read().strip().replace('\r\n', '\n')
|
||||||
print("got result", result)
|
print("got result", result)
|
||||||
if self.checker_code is not None:
|
if self.checker_code is not None:
|
||||||
|
print('using checker')
|
||||||
with open(join(self.path, 'expected.txt'), 'w') as fs:
|
with open(join(self.path, 'expected.txt'), 'w') as fs:
|
||||||
fs.write(self.predicted)
|
fs.write(self.predicted)
|
||||||
with open(join(self.path, 'checker.py'), 'w') as fs:
|
with open(join(self.path, 'checker.py'), 'w') as fs:
|
||||||
@ -49,8 +50,11 @@ class BaseTester:
|
|||||||
if code != 0:
|
if code != 0:
|
||||||
raise TestException("WA")
|
raise TestException("WA")
|
||||||
else:
|
else:
|
||||||
|
print('using simple check')
|
||||||
if result != self.predicted:
|
if result != self.predicted:
|
||||||
|
print('incorrect')
|
||||||
raise TestException("WA")
|
raise TestException("WA")
|
||||||
|
print('correct')
|
||||||
|
|
||||||
def after_test(self):
|
def after_test(self):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user