Test that a head leaving exactly the floor still shows the transcript
CI / tests (pull_request) Successful in 3m7s
CI / tests (pull_request) Successful in 3m7s
This commit is contained in:
@@ -158,6 +158,10 @@ class JudgePrompt(unittest.TestCase):
|
||||
self.assertTrue(grounds.shown.endswith("\n\nMerged."))
|
||||
self.assertGreaterEqual(len(grounds.shown), judge.TRANSCRIPT_FLOOR)
|
||||
self.assertLessEqual(len(prompt), judge.JUDGE_PROMPT_CHARS)
|
||||
room = judge.JUDGE_PROMPT_CHARS - (len(prompt) - len(grounds.shown))
|
||||
at_floor = judge.JUDGE_PROMPT_CHARS - 10000 + room - 2 * judge.TRANSCRIPT_FLOOR
|
||||
self.assertEqual(len(judge.judge_prompt(self.brief(entries, 0, records="r" * at_floor))[1].shown), judge.TRANSCRIPT_FLOOR, "a head that leaves exactly the floor still shows it")
|
||||
self.assertIsInstance(judge.judge_prompt(self.brief(entries, 0, records="r" * (at_floor + 1))), Failure)
|
||||
short = [assistant({"type": "text", "text": "Merged."})]
|
||||
_, grounds = judge.judge_prompt(self.brief(short, 0, records="r" * (judge.JUDGE_PROMPT_CHARS - 10000)))
|
||||
self.assertEqual(grounds.shown, "Merged.", "a transcript shorter than the floor needs only its own length")
|
||||
|
||||
Reference in New Issue
Block a user