Standardisation 9
This commit is contained in:
@@ -322,6 +322,10 @@ class StandardCliTests(unittest.TestCase):
|
||||
"gemini_for_labels": load_script_module(
|
||||
"gemini_for_labels.py", "gemini_for_labels"
|
||||
),
|
||||
"gemini_for_enonce": load_script_module(
|
||||
"gemini_for_enonce.py", "gemini_for_enonce"
|
||||
),
|
||||
"enonce_info": load_script_module("enonce_info.py", "enonce_info"),
|
||||
"correction": load_script_module("correction.py", "correction"),
|
||||
"submit_batches": load_script_module(
|
||||
"submit_batches.py", "submit_batches"
|
||||
@@ -372,6 +376,8 @@ class StandardCliTests(unittest.TestCase):
|
||||
"page_splitter": [missing],
|
||||
"plotting": [missing],
|
||||
"gemini_for_labels": [missing],
|
||||
"gemini_for_enonce": [missing],
|
||||
"enonce_info": [missing],
|
||||
"correction": [missing],
|
||||
"submit_batches": [missing],
|
||||
"fetch_batched_results": [missing],
|
||||
@@ -419,6 +425,16 @@ class StandardCliTests(unittest.TestCase):
|
||||
steps = {step.id: step for step in build_workflow(True)}
|
||||
evaluation = "Evaluation with spaces"
|
||||
cases = {
|
||||
"gemini_for_enonce": (
|
||||
"statement",
|
||||
"gemini",
|
||||
{"target": evaluation, "restart": True},
|
||||
),
|
||||
"enonce_info": (
|
||||
"statement",
|
||||
"personal",
|
||||
{"target": evaluation},
|
||||
),
|
||||
"export": ("export", "default", {"target": evaluation, "refaire": True}),
|
||||
"import": ("import", "default", {"target": evaluation, "refaire": True}),
|
||||
"giving_names": (
|
||||
@@ -534,6 +550,21 @@ class StandardCliTests(unittest.TestCase):
|
||||
self.assertEqual(parsed.operation, step_id)
|
||||
self.assertEqual(str(parsed.evaluation), evaluation)
|
||||
|
||||
def test_enonce_info_preserves_labels_when_no_blocks_are_found(self) -> None:
|
||||
module = self.modules["enonce_info"]
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
evaluation = Path(directory) / "Exam"
|
||||
evaluation.mkdir()
|
||||
(evaluation / "source.tex").write_text(
|
||||
"No SHEETINFO blocks\n", encoding="utf-8"
|
||||
)
|
||||
(evaluation / "labels").write_text("Existing\n", encoding="utf-8")
|
||||
self.assertEqual(
|
||||
module.process_directory(EvaluationWorkspace(evaluation)), 4
|
||||
)
|
||||
self.assertEqual((evaluation / "labels").read_text(), "Existing\n")
|
||||
self.assertFalse(list(evaluation.glob(".labels.*.tmp")))
|
||||
|
||||
def test_export_main_copies_outputs(self) -> None:
|
||||
module = self.modules["export"]
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
|
||||
Reference in New Issue
Block a user