This commit is contained in:
Egor Matveev
2021-12-19 13:47:30 +03:00
parent 7f3ace4b45
commit 77f1d18d24
3 changed files with 21 additions and 1 deletions

View File

@@ -30,6 +30,8 @@ class BaseTester:
raise TestException("CE")
def test(self, filename):
self.solution.test = int(filename)
self.solution.save()
code = self.solution.exec_command(
f"< {filename} {self.command} > output.txt",
timeout=self.solution.task.time_limit / 1000,
@@ -97,6 +99,7 @@ class BaseTester:
self.test(test.filename)
self.after_test()
self.solution.result = CONSTS["ok_status"]
self.solution.test = None
progress = Progress.objects.get(
user=self.solution.user, task=self.solution.task
)