miscs (Interro02) : horizontal cutting resolution
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
from copienator import prompting
|
||||
|
||||
|
||||
class PromptingTests(unittest.TestCase):
|
||||
def test_perspective_is_inserted_with_alternative_method_guidance(self) -> None:
|
||||
with patch.object(
|
||||
prompting, "get_label_text_content", return_value="Question"
|
||||
), patch.object(
|
||||
prompting, "get_label_sol_content", return_value="Solution"
|
||||
), patch.object(
|
||||
prompting, "get_label_persp_content", return_value="Barème détaillé"
|
||||
):
|
||||
prompt = prompting.make_prompt("evaluation", "Ex 1")
|
||||
|
||||
self.assertIn(prompting.PERSPECTIVE_GUIDANCE, prompt)
|
||||
self.assertIn("Barème détaillé", prompt)
|
||||
|
||||
def test_alternative_method_guidance_is_omitted_without_perspective(self) -> None:
|
||||
with patch.object(
|
||||
prompting, "get_label_text_content", return_value="Question"
|
||||
), patch.object(
|
||||
prompting, "get_label_sol_content", return_value="Solution"
|
||||
), patch.object(prompting, "get_label_persp_content", return_value=None):
|
||||
prompt = prompting.make_prompt("evaluation", "Ex 1")
|
||||
|
||||
self.assertNotIn(prompting.PERSPECTIVE_GUIDANCE, prompt)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user