sprint/CheckerExecutor/testers/KotlinTester.py
2022-02-16 17:40:46 +03:00

22 lines
515 B
Python

from os import listdir
from .BaseTester import BaseTester, TestException
class KotlinTester(BaseTester):
def before_test(self):
files = [
file
for file in listdir(self.path)
if file.endswith(".kt")
]
code = self.exec_command(
f'kotlinc {" ".join(files)} -include-runtime -d solution.jar'
)
if code != 0:
raise TestException("CE")
@property
def command(self):
return "java -jar solution.jar"