Add per label remark, post correction

This commit is contained in:
sebastien committed 2026-10-26 12:44:29 +01:00
1 parent 3abd7873e6
commit 8918d64452
13 files changed
+343 -23

No files matched your search

@@ -11,6 +11,7 @@ from PIL import Image
from copienator import EvaluationWorkspace, ExitCode, atomic_write_json, configuration
from copienator.annotation_data import AnnotationLoadResult
from copienator.annotation_read_cache import STATE_FILE
from copienator.custom_remarks import set_remark
from copienator.commands import annotating, reading_annotations as standard
from copienator.commands import reading_grouped_annotations as grouped
@@ -89,6 +90,19 @@ class IncrementalAnnotationReadsTests(unittest.TestCase):
self.assertEqual(scan.call_args.args[1], {"01"})
run(0)
# Remarks are per-copy inputs, including their removal.
set_remark(root, "1", "Ex 1", "Justifier cette étape.")
run(1)
self.assertEqual(compose.call_args.args[2]["feedback"][-1]["text"], "Justifier cette étape.")
run(0)
set_remark(root, "01", "Ex 1", "Détailler le calcul.")
run(1)
self.assertEqual(len(compose.call_args.args[2]["feedback"]), 1)
set_remark(root, "1", "Ex 1", "")
run(1)
self.assertEqual(compose.call_args.args[2]["feedback"], [])
run(0)
# Per-copy sources and correction data invalidate only that copy.
(root / "Copies" / "01.pdf").write_bytes(b"replaced answer PDF")
run(1)