From 96f1f74aaf9d9fd00751861d1192510e4569ab09 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Sun, 10 Jan 2021 15:08:20 +0100 Subject: [PATCH] Fixing tests. It seems master changed something in the warnings. (#9483) Trying to keep warning tests for now. Should be discarded if it becomes too hard to maintain. --- tests/test_pipelines_conversational.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_pipelines_conversational.py b/tests/test_pipelines_conversational.py index ad00d92b3b..c70090e2ce 100644 --- a/tests/test_pipelines_conversational.py +++ b/tests/test_pipelines_conversational.py @@ -134,10 +134,10 @@ class SimpleConversationPipelineTests(unittest.TestCase): generated_responses=["b"], ) with self.assertLogs("transformers", level="WARNING") as log: - _ = conversation_agent(conversation, max_length=60) + _ = conversation_agent(conversation, max_length=64) self.assertEqual(len(log.output), 3) - self.assertIn("Cutting history off because it's too long (63 > 28) for underlying model", log.output[0]) - self.assertIn("63 is bigger than 0.9 * max_length: 60", log.output[1]) + self.assertIn("Cutting history off because it's too long (63 > 32) for underlying model", log.output[0]) + self.assertIn("63 is bigger than 0.9 * max_length: 64", log.output[1]) self.assertIn("Setting `pad_token_id`", log.output[2]) self.assertEqual(conversation._index, 1) self.assertEqual(