From e57b7ea1f5d93b8f9ebea825a742ed6ec5be1088 Mon Sep 17 00:00:00 2001 From: Matteo Bertucci Date: Thu, 25 Feb 2021 18:18:12 +0100 Subject: Remove unused import --- backend/routes/forms/unittesting.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'backend/routes/forms/unittesting.py') diff --git a/backend/routes/forms/unittesting.py b/backend/routes/forms/unittesting.py index ef86e7f..4b362e1 100644 --- a/backend/routes/forms/unittesting.py +++ b/backend/routes/forms/unittesting.py @@ -1,4 +1,3 @@ -import ast from collections import namedtuple from itertools import count from textwrap import indent @@ -15,6 +14,9 @@ with open("resources/unittest_template.py") as file: UnittestResult = namedtuple("UnittestResult", "question_id return_code passed result") +# Mapping of questions to their generated +_unit_cache: dict[str, str] = {} + def filter_unittests(form: Form) -> Form: """ @@ -35,7 +37,7 @@ def _make_unit_code(units: dict[str, str]) -> str: for unit_name, unit_code in units.items(): result += ( - f"\ndef test_{unit_name.lstrip('#')}(unit):" # Function definition + f"\ndef test_{unit_name.lstrip('#')}(unit):" # Function definition f"\n{indent(unit_code, ' ')}" # Unit code ) -- cgit v1.2.3