testing directory 2
This commit is contained in:
parent
ad62672452
commit
68bda13e1b
@ -9,13 +9,13 @@ class JavaTester(BaseTester):
|
||||
def before_test(self):
|
||||
files = [
|
||||
file
|
||||
for file in listdir(self.solution.testing_directory)
|
||||
for file in listdir(self.path)
|
||||
if file.endswith(".java")
|
||||
]
|
||||
code = self.solution.exec_command(f"javac {' '.join(files)}")
|
||||
if code != 0:
|
||||
raise TestException("CE")
|
||||
for file in listdir(self.solution.testing_directory):
|
||||
for file in listdir(self.path):
|
||||
if file.endswith(".class"):
|
||||
self._executable = file.rstrip(".class")
|
||||
break
|
||||
|
@ -7,7 +7,7 @@ class KotlinTester(BaseTester):
|
||||
def before_test(self):
|
||||
files = [
|
||||
file
|
||||
for file in listdir(self.solution.testing_directory)
|
||||
for file in listdir(self.path)
|
||||
if file.endswith(".kt")
|
||||
]
|
||||
code = self.solution.exec_command(
|
||||
|
@ -8,7 +8,7 @@ class Python3Tester(BaseTester):
|
||||
|
||||
def before_test(self):
|
||||
no_files = [file.filename for file in self.solution.task.files]
|
||||
for file in listdir(self.solution.testing_directory):
|
||||
for file in listdir(self.path):
|
||||
if file.endswith(".py") and file not in no_files:
|
||||
self.file = file
|
||||
break
|
||||
|
@ -7,7 +7,7 @@ class SwiftTester(BaseTester):
|
||||
def before_test(self):
|
||||
files = [
|
||||
file
|
||||
for file in listdir(self.solution.testing_directory)
|
||||
for file in listdir(self.path)
|
||||
if file.endswith(".swift")
|
||||
]
|
||||
code = self.solution.exec_command(
|
||||
|
Loading…
Reference in New Issue
Block a user