Some documentation changes

This commit is contained in:
sebastien committed 2026-09-26 22:08:27 +02:00
1 parent 4c56b655fe
commit a03e0e3b4c
9 files changed
+88 -26

No files matched your search

+18
View File
@@ -81,6 +81,24 @@ class GuiConvenienceTests(unittest.TestCase):
style.lookup("MissingPrerequisite.TLabel", "foreground"), "#c62828"
)
def test_only_successful_gemini_analysis_skips_rubric_replacement(self):
for variant, code, interrupted, expected in (
("gemini", 0, False, "skipped"),
("personal", 0, False, "ready"),
("gemini", 4, False, "ready"),
("gemini", 1, False, "ready"),
("gemini", 0, True, "ready"),
):
with self.subTest(variant=variant, code=code, interrupted=interrupted):
self.app.state_store.update_step("statement_persp", status="ready")
self.app.state_store.update_step("statement_groups", status="ready")
self.app.state_store.update_step("statement", last_run_variant=variant)
self.app.active_step_id = "statement"
with patch.object(self.app, "after_idle"):
self.app._finish_process(code, interrupted)
self.assertEqual(self.app.state_store.step("statement_persp")["status"], expected)
self.assertEqual(self.app.state_store.step("statement_groups")["status"], "ready")
def test_compact_evaluation_input_and_open_folder_button(self):
self.assertEqual(int(self.app.evaluation_entry.cget("width")), 42)
self.assertEqual(
+4 -1
View File
@@ -2245,10 +2245,13 @@ class WorkflowTests(unittest.TestCase):
step.title,
"Découper une partie à gauche pour détection des labels",
)
for shortcut in ("n", "N", "t", "l", "1", "Entrée", "s"):
for shortcut in ("←", "→", "↑", "↓", "1", "Entrée", "!", "t/s/r/n"):
with self.subTest(shortcut=shortcut):
self.assertIn(shortcut, step.description)
standard = next(step for step in build_workflow(False) if step.id == "cutleft")
self.assertNotIn("t/s/r/n", standard.description)
def test_export_has_shorter_title_and_annotation_argument(self) -> None:
self.assertEqual(self.steps["export"].title, "Exporter")
command = self.command(
+6 -1
View File
@@ -107,6 +107,11 @@ class MarkedCopiesTests(unittest.TestCase):
self.assertEqual(review.current_width_offset, 50)
review.trigger_processing.assert_called_once_with(self.files[0], 50)
def test_personal_crop_binding_follows_personal_workflow_option(self):
from copienator.configuration import SHOW_PERSONAL_STEPS
self.assertEqual(cutleft.personnal_binding, bool(SHOW_PERSONAL_STEPS))
def test_process_single_pdf_enlarges_crop_and_caps_it_at_page_edge(self):
page = Image.new("RGB", (900, 300), "white")
with patch.object(cutleft, "get_pdf_pages", return_value=[page]):
@@ -188,7 +193,7 @@ class MarkedCopiesGuiTests(unittest.TestCase):
self.assertTrue(reviewer.completed)
return reviewer
first = review_with_keys(self.files, ["<KeyPress-s>", "<Return>"])
first = review_with_keys(self.files, ["<KeyPress-exclam>", "<Return>"])
self.assertTrue(first.had_errors)
self.assertEqual(set(copy_errors(self.workspace)), {"Copie01.pdf"})
self.assertFalse((self.workspace.cutleft_dir / "Copie01_01.jpg").exists())