Bnot fixes ; Missing énoncés fixes.
This commit is contained in:
1 parent
f39868207d
commit
55d5cf16c9
18 files changed
+486
-44
No files matched your search
@@ -71,14 +71,19 @@ class GuiConvenienceTests(unittest.TestCase):
|
||||
self.app.current_step = step
|
||||
self.app._render_step()
|
||||
self.assertEqual([button.cget("text") for button in self.app.review_buttons],
|
||||
["gestion_classe re", "gestion_classe wsn", "gestion_classe we"])
|
||||
["gestion_classe re", "gestion_classe wsn", "gestion_classe we", "gestion_classe mei", "gestion_classe wsnm"])
|
||||
self.assertEqual(self.app.command_box.winfo_manager(), "")
|
||||
self.assertEqual(self.app.run_button.cget("text"), "Marquer réussie")
|
||||
self.assertEqual(self.app.arg_vars["evaluation_name"].get(), self.evaluation.name)
|
||||
self.app.arg_vars["evaluation_name"].set("DS02VB custom")
|
||||
with patch.object(self.app.runner, "start") as start, \
|
||||
patch.object(self.app, "_move_selection_from") as advance:
|
||||
for button, command in zip(self.app.review_buttons, ("re", "wsn", "we")):
|
||||
for button, command in zip(self.app.review_buttons, ("re", "wsn", "we", "mei", "wsnm")):
|
||||
button.invoke()
|
||||
self.assertEqual(start.call_args.args[0], ["gestion_classe", command])
|
||||
expected = ["gestion_classe", command]
|
||||
if command not in {"mei", "wsnm"}:
|
||||
expected.append("DS02VB custom")
|
||||
self.assertEqual(start.call_args.args[0], expected)
|
||||
self.app._finish_process(0, False)
|
||||
self.assertNotEqual(self.app.state_store.step(step.id)["status"], "success")
|
||||
advance.assert_not_called()
|
||||
@@ -87,6 +92,41 @@ class GuiConvenienceTests(unittest.TestCase):
|
||||
start.assert_not_called()
|
||||
self.assertEqual(self.app.state_store.step(step.id)["status"], "success")
|
||||
|
||||
def test_merged_histogram_default_tracks_first_wsnm_launch_and_remains_editable(self):
|
||||
from copienator_gui.workflow import build_workflow
|
||||
from copienator_gui.state import StateStore
|
||||
steps = {step.id: step for step in build_workflow(True)}
|
||||
self.app.step_by_id.update(steps)
|
||||
self.app.current_step = steps['final_score']
|
||||
self.app._render_step()
|
||||
self.assertFalse(self.app.arg_vars['copy_merged_histogramme'].get())
|
||||
self.app._save_current_form()
|
||||
|
||||
def launch():
|
||||
self.app.current_step = steps['personal_read']
|
||||
self.app._render_step()
|
||||
with patch.object(self.app.runner, 'start') as start:
|
||||
self.app.review_buttons[4].invoke()
|
||||
self.assertEqual(start.call_args.args[0], ['gestion_classe', 'wsnm'])
|
||||
self.app._finish_process(0, False)
|
||||
|
||||
launch()
|
||||
reloaded = StateStore()
|
||||
reloaded.load(self.evaluation)
|
||||
self.assertTrue(reloaded.step('personal_read')['wsnm_run'])
|
||||
self.assertTrue(reloaded.step('final_score')['values']['copy_merged_histogramme'])
|
||||
self.app.current_step = steps['final_score']
|
||||
self.app._render_step()
|
||||
self.assertTrue(self.app.arg_vars['copy_merged_histogramme'].get())
|
||||
self.assertIn('--copy-merged-histogramme', self.app._make_command())
|
||||
self.app.arg_vars['copy_merged_histogramme'].set(False)
|
||||
self.app._save_current_form()
|
||||
launch()
|
||||
self.app.current_step = steps['final_score']
|
||||
self.app._render_step()
|
||||
self.assertFalse(self.app.arg_vars['copy_merged_histogramme'].get())
|
||||
self.assertNotIn('--copy-merged-histogramme', self.app._make_command())
|
||||
|
||||
def test_annotation_import_cleanup_can_be_unchecked(self):
|
||||
self.app.tree.selection_set("annotation")
|
||||
self.app.update()
|
||||
|
||||
Reference in new issue
Block a user