Skip to content
Snippets Groups Projects
Commit 2bae38a7 authored by robinwilliam.hundt's avatar robinwilliam.hundt
Browse files

Removed tqdm

parent 60a2008e
No related branches found
No related tags found
No related merge requests found
tqdm~=4.31
\ No newline at end of file
...@@ -6,8 +6,6 @@ import shutil ...@@ -6,8 +6,6 @@ import shutil
import subprocess import subprocess
import tempfile import tempfile
from tqdm import tqdm
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
...@@ -106,7 +104,7 @@ class CompileTest(Test): ...@@ -106,7 +104,7 @@ class CompileTest(Test):
def run_test(self, submission_obj, **kwargs): def run_test(self, submission_obj, **kwargs):
ret = run_cmd( ret = run_cmd(
f"gcc -Wall -c -x c -std=c11 -I {kwargs['header']} -o code.o -", "gcc -Wall -c -x c -std=c11 -I {} -o code.o -".format(kwargs['header']),
submission_obj['code']) submission_obj['code'])
return not ret.returncode, ret.stderr return not ret.returncode, ret.stderr
...@@ -121,15 +119,15 @@ def process(submissions, header, highest_test): ...@@ -121,15 +119,15 @@ def process(submissions, header, highest_test):
# Get something disposable # Get something disposable
if highest_test != EmptyTest.__name__: if highest_test != EmptyTest.__name__:
path = tempfile.mkdtemp() path = tempfile.mkdtemp()
run_cmd(f'cp -r {header} {path}') run_cmd('cp -r {} {}'.format(header, path))
os.chdir(path) os.chdir(path)
def iterate_submissions(): def iterate_submissions():
yield from (obj yield from (obj
for student in tqdm(submissions_json['students']) for student in submissions_json['students']
for obj in student['submissions']) for obj in student['submissions'])
for submission_obj in tqdm(iterate_submissions()): for submission_obj in iterate_submissions():
highest_test_class(submission_obj, header=header) highest_test_class(submission_obj, header=header)
if highest_test != EmptyTest.__name__: if highest_test != EmptyTest.__name__:
run_cmd('rm code*') run_cmd('rm code*')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment